mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 18:43:33 +02:00
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>
This commit is contained in:
parent
910a78d816
commit
5ebc20921b
|
|
@ -487,7 +487,7 @@ static int tas2552_runtime_suspend(struct device *dev)
|
|||
regcache_cache_only(tas2552->regmap, true);
|
||||
regcache_mark_dirty(tas2552->regmap);
|
||||
|
||||
gpiod_set_value(tas2552->enable_gpio, 0);
|
||||
gpiod_set_value_cansleep(tas2552->enable_gpio, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -496,7 +496,7 @@ static int tas2552_runtime_resume(struct device *dev)
|
|||
{
|
||||
struct tas2552_data *tas2552 = dev_get_drvdata(dev);
|
||||
|
||||
gpiod_set_value(tas2552->enable_gpio, 1);
|
||||
gpiod_set_value_cansleep(tas2552->enable_gpio, 1);
|
||||
|
||||
tas2552_sw_shutdown(tas2552, 0);
|
||||
|
||||
|
|
@ -583,7 +583,7 @@ static int tas2552_component_probe(struct snd_soc_component *component)
|
|||
return ret;
|
||||
}
|
||||
|
||||
gpiod_set_value(tas2552->enable_gpio, 1);
|
||||
gpiod_set_value_cansleep(tas2552->enable_gpio, 1);
|
||||
|
||||
ret = pm_runtime_resume_and_get(component->dev);
|
||||
if (ret < 0) {
|
||||
|
|
@ -608,7 +608,7 @@ static int tas2552_component_probe(struct snd_soc_component *component)
|
|||
|
||||
probe_fail:
|
||||
pm_runtime_put_noidle(component->dev);
|
||||
gpiod_set_value(tas2552->enable_gpio, 0);
|
||||
gpiod_set_value_cansleep(tas2552->enable_gpio, 0);
|
||||
|
||||
regulator_bulk_disable(ARRAY_SIZE(tas2552->supplies),
|
||||
tas2552->supplies);
|
||||
|
|
@ -621,7 +621,7 @@ static void tas2552_component_remove(struct snd_soc_component *component)
|
|||
|
||||
pm_runtime_put(component->dev);
|
||||
|
||||
gpiod_set_value(tas2552->enable_gpio, 0);
|
||||
gpiod_set_value_cansleep(tas2552->enable_gpio, 0);
|
||||
};
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user