All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: tlv320aic31xx: switch to gpiod_set_value_cansleep
@ 2023-10-19 13:18 Marco Felsch
  2023-10-19 20:47 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Marco Felsch @ 2023-10-19 13:18 UTC (permalink / raw)
  To: shenghao-ding, kevin-lu, baojun.xu, lgirdwood, broonie; +Cc: alsa-devel, kernel

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>
---
 sound/soc/codecs/tlv320aic31xx.c | 6 +++---
 1 file 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);
 	}
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: tlv320aic31xx: switch to gpiod_set_value_cansleep
  2023-10-19 13:18 [PATCH] ASoC: tlv320aic31xx: switch to gpiod_set_value_cansleep Marco Felsch
@ 2023-10-19 20:47 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2023-10-19 20:47 UTC (permalink / raw)
  To: shenghao-ding, kevin-lu, baojun.xu, lgirdwood, Marco Felsch
  Cc: alsa-devel, kernel

On Thu, 19 Oct 2023 15:18:06 +0200, Marco Felsch wrote:
> Switch to gpiod_set_value_cansleep() to support gpiochips which can
> sleep like i2c gpio expanders.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: tlv320aic31xx: switch to gpiod_set_value_cansleep
      commit: 897d8e86bac76d26dcd08fbd0917d9bdb280a66f

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-19 20:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-19 13:18 [PATCH] ASoC: tlv320aic31xx: switch to gpiod_set_value_cansleep Marco Felsch
2023-10-19 20:47 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.