From: sashiko-bot@kernel.org
To: "Arina Kharlamova" <arina.kharlamova@mbzuai.ac.ae>
Cc: linux-sound@vger.kernel.org
Subject: Re: [PATCH v2 2/2] ASoC: tas2552: Enable the supplies in the I2C probe
Date: Thu, 03 Dec 2026 11:34:19 +0000 [thread overview]
Message-ID: <sashiko-outbox-247677@kernel.org> (raw)
In-Reply-To: <20261203-tas2552-rpm-v2-2-7292beb88b1f@mbzuai.ac.ae>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] ASoC: tas2552: supplies disabled while enable_gpio stays high
on unbind
--
commit f841fc84b4ec0bd5de01b4f81bb48d3d5d5fe1d2
Author: Arina Kharlamova <arina.kharlamova@mbzuai.ac.ae>
ASoC: tas2552: Enable the supplies in the I2C probe
This commit moves regulator_bulk_enable() from tas2552_component_probe() to
tas2552_probe() and registers a devm action to disable the supplies on driver
unbind.
> diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c
> index 0f0c6f1afde78..af270acfd74f5 100644
> --- a/sound/soc/codecs/tas2552.c
> +++ b/sound/soc/codecs/tas2552.c
[ ... ]
> @@ -706,6 +695,14 @@ static const struct regmap_config tas2552_regmap_config = {
> .cache_type = REGCACHE_RBTREE,
> };
>
> +static void tas2552_disable_supplies(void *data)
> +{
> + struct tas2552_data *tas2552 = data;
> +
> + regulator_bulk_disable(ARRAY_SIZE(tas2552->supplies),
> + tas2552->supplies);
> +}
> +
> static int tas2552_probe(struct i2c_client *client)
> {
> struct device *dev;
[Severity: Medium]
Can this disable the supplies while enable_gpio is still high and the chip is
out of software shutdown?
When the device is unbound while runtime suspended, __device_release_driver()
calls pm_runtime_get_sync(), running tas2552_runtime_resume() which drives
enable_gpio high and exits software shutdown. Its pm_runtime_put_sync() only
arms the 1000 ms autosuspend timer instead of suspending immediately.
tas2552_i2c_remove() then calls pm_runtime_disable(), which cancels the
pending autosuspend timer without running tas2552_runtime_suspend(). Devres
teardown runs tas2552_disable_supplies() next, cutting vbat, iovdd, and avdd
while enable_gpio stays asserted.
That violates the power-down sequence and risks back-powering through
enable_gpio or causing audible pops on supply collapse. Putting the chip
into software shutdown and driving enable_gpio low before disabling the
supplies would avoid this.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261203-tas2552-rpm-v2-0-7292beb88b1f@mbzuai.ac.ae?part=2
prev parent reply other threads:[~2026-12-03 11:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 11:12 [PATCH v2 0/2] ASoC: tas2552: Fix runtime PM and supply refcounting Arina Kharlamova
2026-12-03 11:12 ` Arina Kharlamova via B4 Relay
2026-12-03 11:12 ` [PATCH v2 1/2] ASoC: tas2552: Fix runtime PM usage count underflow in probe Arina Kharlamova
2026-12-03 11:12 ` Arina Kharlamova via B4 Relay
2026-12-03 11:34 ` sashiko-bot
2026-12-03 11:12 ` [PATCH v2 2/2] ASoC: tas2552: Enable the supplies in the I2C probe Arina Kharlamova
2026-12-03 11:12 ` Arina Kharlamova via B4 Relay
2026-12-03 11:34 ` sashiko-bot [this message]
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=sashiko-outbox-247677@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=arina.kharlamova@mbzuai.ac.ae \
--cc=linux-sound@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 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.