From: sashiko-bot@kernel.org
To: "Arina Kharlamova" <arina.kharlamova@mbzuai.ac.ae>
Cc: linux-sound@vger.kernel.org
Subject: Re: [PATCH 2/3] ASoC: codecs: es8375: Disable core supplies on unbind
Date: Tue, 01 Dec 2026 19:33:53 +0000 [thread overview]
Message-ID: <sashiko-outbox-244086@kernel.org> (raw)
In-Reply-To: <20261201-s2p-asoc-es-v1-2-a628a12e89ad@mbzuai.ac.ae>
Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [High] ASoC: codecs: es8375: unpowered I2C access in
es8375_i2c_probe() [1]
--
commit bbbd18d6639b0c2567cfd29b9dd747544cbb0291
Author: Arina Kharlamova <arina.kharlamova@mbzuai.ac.ae>
ASoC: codecs: es8375: Disable core supplies on unbind
This commit registers a devres action in es8375_read_device_properities()
to disable the codec's core regulators when the device is unbound or probe
fails.
> diff --git a/sound/soc/codecs/es8375.c b/sound/soc/codecs/es8375.c
> index 7bb6c8d3a7788..14361e5fcab5a 100644
> --- a/sound/soc/codecs/es8375.c
> +++ b/sound/soc/codecs/es8375.c
> @@ -662,6 +662,13 @@ static struct snd_soc_component_driver es8375_codec_driver = {
> .suspend_bias_off = 1,
> };
>
> +static void es8375_disable_supplies(void *data)
> +{
> + struct es8375_priv *es8375 = data;
> +
> + regulator_bulk_disable(ARRAY_SIZE(es8375_core_supplies), es8375->core_supply);
> +}
> +
> static int es8375_read_device_properities(struct device *dev, struct es8375_priv *es8375)
> {
> int ret, i;
> @@ -698,6 +705,12 @@ static int es8375_read_device_properities(struct device *dev, struct es8375_priv
> return ret;
> }
>
> + ret = devm_add_action_or_reset(dev, es8375_disable_supplies, es8375);
> + if (ret) {
> + clk_disable_unprepare(es8375->mclk);
> + return ret;
> + }
> +
> return 0;
> }
[Severity: High]
This problem wasn't introduced by this patch, but can the ES8375_CHIP_ID1
and ES8375_CHIP_ID0 reads in es8375_i2c_probe() succeed when the codec is
initially unpowered [1]?
es8375_i2c_probe() reads the chip ID registers before calling
es8375_read_device_properities(), which requests and enables core_supply
and mclk:
sound/soc/codecs/es8375.c:es8375_i2c_probe() {
...
ret = regmap_read(es8375->regmap, ES8375_CHIP_ID1, &val);
if (ret < 0) {
dev_err(&i2c_client->dev, "failed to read i2c at addr %X\n",
i2c_client->addr);
return ret;
}
...
ret = es8375_read_device_properities(dev, es8375);
...
}
When those supplies are off at probe time, the I2C reads fail and abort
probing before the regulators and clock are enabled.
[1] https://sashiko.dev/#/bug/linux-71adb255-1596-4ed2-a0f3-9cde51b1f16c
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261201-s2p-asoc-es-v1-0-a628a12e89ad@mbzuai.ac.ae?part=2
next prev parent reply other threads:[~2026-12-01 19:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 19:22 [PATCH 0/3] ASoC: codecs: Everest: fix clock and supply balance Arina Kharlamova via B4 Relay
2026-12-01 19:22 ` Arina Kharlamova
2026-12-01 19:22 ` [PATCH 1/3] ASoC: codecs: es8323: Remove mclk calls from es8323_set_bias_level Arina Kharlamova via B4 Relay
2026-12-01 19:22 ` Arina Kharlamova
2026-12-01 19:22 ` [PATCH 2/3] ASoC: codecs: es8375: Disable core supplies on unbind Arina Kharlamova via B4 Relay
2026-12-01 19:22 ` Arina Kharlamova
2026-12-01 19:33 ` sashiko-bot [this message]
2026-12-01 19:22 ` [PATCH 3/3] ASoC: codecs: ES8326: Keep mclk enabled while the device is bound Arina Kharlamova via B4 Relay
2026-12-01 19:22 ` Arina Kharlamova
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-244086@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.