diff options
author | Marco Felsch <m.felsch@pengutronix.de> | 2023-10-19 15:18:06 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-10-19 15:53:31 +0200 |
commit | 897d8e86bac76d26dcd08fbd0917d9bdb280a66f (patch) | |
tree | fadb19bd570c5723255acc90fb7760a559eb6017 /sound/soc/codecs/tlv320aic31xx.c | |
parent | ASoC: mediatek: mt8186_mt6366_rt1019_rt5682s: add (diff) | |
download | linux-897d8e86bac76d26dcd08fbd0917d9bdb280a66f.tar.xz linux-897d8e86bac76d26dcd08fbd0917d9bdb280a66f.zip |
ASoC: tlv320aic31xx: switch to gpiod_set_value_cansleep
Switch to gpiod_set_value_cansleep() to support gpiochips which can
sleep like i2c gpio expanders.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Link: https://lore.kernel.org/r/20231019131806.381280-1-m.felsch@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | sound/soc/codecs/tlv320aic31xx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c index 9611aa8acb0d..4d7c5a80c6ed 100644 --- a/sound/soc/codecs/tlv320aic31xx.c +++ b/sound/soc/codecs/tlv320aic31xx.c @@ -1208,7 +1208,7 @@ static int aic31xx_regulator_event(struct notifier_block *nb, * supplies was disabled. */ if (aic31xx->gpio_reset) - gpiod_set_value(aic31xx->gpio_reset, 1); + gpiod_set_value_cansleep(aic31xx->gpio_reset, 1); regcache_mark_dirty(aic31xx->regmap); dev_dbg(aic31xx->dev, "## %s: DISABLE received\n", __func__); @@ -1222,9 +1222,9 @@ static int aic31xx_reset(struct aic31xx_priv *aic31xx) int ret = 0; if (aic31xx->gpio_reset) { - gpiod_set_value(aic31xx->gpio_reset, 1); + gpiod_set_value_cansleep(aic31xx->gpio_reset, 1); ndelay(10); /* At least 10ns */ - gpiod_set_value(aic31xx->gpio_reset, 0); + gpiod_set_value_cansleep(aic31xx->gpio_reset, 0); } else { ret = regmap_write(aic31xx->regmap, AIC31XX_RESET, 1); } |