Skip to content

Commit 897d8e8

Browse files
Marco Felschbroonie
authored andcommitted
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>
1 parent 79a2ab1 commit 897d8e8

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

sound/soc/codecs/tlv320aic31xx.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ static int aic31xx_regulator_event(struct notifier_block *nb,
12081208
* supplies was disabled.
12091209
*/
12101210
if (aic31xx->gpio_reset)
1211-
gpiod_set_value(aic31xx->gpio_reset, 1);
1211+
gpiod_set_value_cansleep(aic31xx->gpio_reset, 1);
12121212

12131213
regcache_mark_dirty(aic31xx->regmap);
12141214
dev_dbg(aic31xx->dev, "## %s: DISABLE received\n", __func__);
@@ -1222,9 +1222,9 @@ static int aic31xx_reset(struct aic31xx_priv *aic31xx)
12221222
int ret = 0;
12231223

12241224
if (aic31xx->gpio_reset) {
1225-
gpiod_set_value(aic31xx->gpio_reset, 1);
1225+
gpiod_set_value_cansleep(aic31xx->gpio_reset, 1);
12261226
ndelay(10); /* At least 10ns */
1227-
gpiod_set_value(aic31xx->gpio_reset, 0);
1227+
gpiod_set_value_cansleep(aic31xx->gpio_reset, 0);
12281228
} else {
12291229
ret = regmap_write(aic31xx->regmap, AIC31XX_RESET, 1);
12301230
}

0 commit comments

Comments
 (0)