From: sashiko-bot@kernel.org
To: "Michael Zhang" <zhangyi@everest-semi.com>
Cc: robh@kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v0 1/7] ASoC: codecs: ES8389: Modify volatile_register
Date: Mon, 08 Jun 2026 08:50:17 +0000 [thread overview]
Message-ID: <20260608085017.9B13D1F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260608083540.12581-2-zhangyi@everest-semi.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Incomplete volatile register whitelist in es8389_volatile_register defaults critical configuration registers to volatile, preventing caching and causing state loss on system resume.
--
commit 6d3835182ae5a01c7bc864c068b51c95ea47c9c2
Author: Zhang Yi <zhangyi@everest-semi.com>
ASoC: codecs: ES8389: Modify volatile_register
This commit modifies the volatile register handling for the ES8389 codec.
It replaces a simple address range check with a specific whitelist of
registers that should be considered non-volatile.
> diff --git a/sound/soc/codecs/es8389.c b/sound/soc/codecs/es8389.c
> --- a/sound/soc/codecs/es8389.c
> +++ b/sound/soc/codecs/es8389.c
[ ... ]
> @@ -50,10 +50,29 @@ static const char * const es8389_core_supplies[] = {
> static bool es8389_volatile_register(struct device *dev,
> unsigned int reg)
> {
> - if ((reg <= 0xff))
> - return true;
> - else
> + switch (reg) {
> + case ES8389_ADC_HPF1:
> + case ES8389_ADC_HPF2:
[ ... ]
> + case ES8389_MIX_VOL:
> + case ES8389_DAC_MIX:
> + case ES8389_ADC_RESET:
> return false;
> + default:
> + return true;
> + }
> }
[Severity: High]
This is a pre-existing issue, but since you are updating the volatile
register logic here, could this default-to-true behavior cause problems
during system resume?
Critical configuration registers like ES8389_DMIC_EN and ES8389_ADC_MODE
(managed by the 'ADC MUX' user kcontrol), as well as format registers
configured by es8389_set_dai_fmt() (e.g., ES8389_ADC_FORMAT_MUTE and
ES8389_DAC_FORMAT_MUTE), are not explicitly listed in this switch statement.
Because they fall through to this default case, they are marked as
volatile and bypass the regmap cache. When the system resumes from
suspend, regcache_sync() will not restore these registers.
If the codec resets these registers to hardware defaults upon resuming,
won't user-selected mux configurations and DAI formats be permanently
lost, potentially breaking the audio path?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260608083540.12581-1-zhangyi@everest-semi.com?part=1
next prev parent reply other threads:[~2026-06-08 8:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-08 8:35 [PATCH v0 0/7] ASoC: codecs: ES8389: Modify the ES8389 driver Michael Zhang
2026-06-08 8:35 ` [PATCH v0 1/7] ASoC: codecs: ES8389: Modify volatile_register Michael Zhang
2026-06-08 8:50 ` sashiko-bot [this message]
2026-06-08 8:35 ` [PATCH v0 2/7] ASoC: codecs: ES8389: Fix the issue about mclk_src Michael Zhang
2026-06-08 8:52 ` sashiko-bot
2026-06-08 8:35 ` [PATCH v0 3/7] ASoC: codecs: ES8389: Modify the clock table Michael Zhang
2026-06-08 8:51 ` sashiko-bot
2026-06-08 8:35 ` [PATCH v0 4/7] ASoC: codecs: ES8389: Modify the initial configuration Michael Zhang
2026-06-08 8:46 ` sashiko-bot
2026-06-08 8:35 ` [PATCH v0 5/7] ASoC: codecs: ES8389: Add private members related to HPF Michael Zhang
2026-06-08 8:49 ` sashiko-bot
2026-06-08 8:35 ` [PATCH v0 6/7] ASoC: codecs: ES8389: Add INPUTL MUX and INPUTR MUX Michael Zhang
2026-06-08 8:35 ` [PATCH v0 7/7] ASoC: dt-bindings: ES8389: Add members about HPF Michael Zhang
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=20260608085017.9B13D1F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=zhangyi@everest-semi.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