From: Marek Vasut <marex@nabladev.com>
To: linux-sound@vger.kernel.org
Cc: Marek Vasut <marex@nabladev.com>, Baojun Xu <baojun.xu@ti.com>,
Jaroslav Kysela <perex@perex.cz>, Kevin Lu <kevin-lu@ti.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Shenghao Ding <shenghao-ding@ti.com>,
Takashi Iwai <tiwai@suse.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] ASoC: tas2552: Allow audio enable GPIO to sleep
Date: Fri, 20 Feb 2026 21:22:19 +0100 [thread overview]
Message-ID: <20260220202332.241035-1-marex@nabladev.com> (raw)
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>
---
Cc: Baojun Xu <baojun.xu@ti.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Kevin Lu <kevin-lu@ti.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Shenghao Ding <shenghao-ding@ti.com>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-sound@vger.kernel.org
---
sound/soc/codecs/tas2552.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c
index 43449d7c25843..80206c2e09462 100644
--- a/sound/soc/codecs/tas2552.c
+++ b/sound/soc/codecs/tas2552.c
@@ -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
--
2.51.0
next reply other threads:[~2026-02-20 20:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-20 20:22 Marek Vasut [this message]
2026-02-25 19:06 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260220202332.241035-1-marex@nabladev.com \
--to=marex@nabladev.com \
--cc=baojun.xu@ti.com \
--cc=broonie@kernel.org \
--cc=kevin-lu@ti.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=shenghao-ding@ti.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®