Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: tas2552: Allow audio enable GPIO to sleep

The audio enable GPIO is not toggled in any critical section where it
could not sleep, allow the audio enable GPIO to sleep. This allows the
driver to operate the audio enable GPIO connected to I2C GPIO expander.

Signed-off-by: Marek Vasut <marex@nabladev.com>
Link: https://patch.msgid.link/20260220202332.241035-1-marex@nabladev.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Marek Vasut and committed by
Mark Brown
5ebc2092 910a78d8

+5 -5
+5 -5
sound/soc/codecs/tas2552.c
··· 487 487 regcache_cache_only(tas2552->regmap, true); 488 488 regcache_mark_dirty(tas2552->regmap); 489 489 490 - gpiod_set_value(tas2552->enable_gpio, 0); 490 + gpiod_set_value_cansleep(tas2552->enable_gpio, 0); 491 491 492 492 return 0; 493 493 } ··· 496 496 { 497 497 struct tas2552_data *tas2552 = dev_get_drvdata(dev); 498 498 499 - gpiod_set_value(tas2552->enable_gpio, 1); 499 + gpiod_set_value_cansleep(tas2552->enable_gpio, 1); 500 500 501 501 tas2552_sw_shutdown(tas2552, 0); 502 502 ··· 583 583 return ret; 584 584 } 585 585 586 - gpiod_set_value(tas2552->enable_gpio, 1); 586 + gpiod_set_value_cansleep(tas2552->enable_gpio, 1); 587 587 588 588 ret = pm_runtime_resume_and_get(component->dev); 589 589 if (ret < 0) { ··· 608 608 609 609 probe_fail: 610 610 pm_runtime_put_noidle(component->dev); 611 - gpiod_set_value(tas2552->enable_gpio, 0); 611 + gpiod_set_value_cansleep(tas2552->enable_gpio, 0); 612 612 613 613 regulator_bulk_disable(ARRAY_SIZE(tas2552->supplies), 614 614 tas2552->supplies); ··· 621 621 622 622 pm_runtime_put(component->dev); 623 623 624 - gpiod_set_value(tas2552->enable_gpio, 0); 624 + gpiod_set_value_cansleep(tas2552->enable_gpio, 0); 625 625 }; 626 626 627 627 #ifdef CONFIG_PM