From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: Pengpeng Hou <pengpeng@iscas.ac.cn>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>
Cc: Srinivas Kandagatla <srini@kernel.org>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, Oder Chiou <oder_chiou@realtek.com>,
Shenghao Ding <shenghao-ding@ti.com>, Kevin Lu <kevin-lu@ti.com>,
Baojun Xu <baojun.xu@ti.com>,
David Rhodes <david.rhodes@cirrus.com>,
patches@opensource.cirrus.com,
Bartosz Golaszewski <brgl@kernel.org>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Charles Keepax <ckeepax@opensource.cirrus.com>,
Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>,
Shengjiu Wang <shengjiu.wang@nxp.com>,
Sharique Mohammad <sharq0406@gmail.com>
Subject: Re: [PATCH 12/19] ASoC: codecs: wm2200: Propagate regcache_sync() errors
Date: Mon, 6 Jul 2026 10:00:15 +0100 [thread overview]
Message-ID: <44917230-34d0-4305-a07b-2cc86d608683@opensource.cirrus.com> (raw)
In-Reply-To: <20260704040044.2402-1-pengpeng@iscas.ac.cn>
On 04/07/2026 5:00 am, Pengpeng Hou wrote:
> regcache_sync() can fail while replaying cached register state during
> runtime resume. wm2200_runtime_resume() currently ignores that failure.
>
> Propagate the error, restore cache-only/dirty state, and unwind the LDO
> and core supplies acquired by runtime resume.
>
> Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
> ---
> sound/soc/codecs/wm2200.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/sound/soc/codecs/wm2200.c b/sound/soc/codecs/wm2200.c
> index ba8ce2e6e615..bc78b553b6cb 100644
> --- a/sound/soc/codecs/wm2200.c
> +++ b/sound/soc/codecs/wm2200.c
> @@ -2461,7 +2461,15 @@ static int wm2200_runtime_resume(struct device *dev)
> }
>
> regcache_cache_only(wm2200->regmap, false);
> - regcache_sync(wm2200->regmap);
> + ret = regcache_sync(wm2200->regmap);
> + if (ret) {
> + regcache_cache_only(wm2200->regmap, true);
> + regcache_mark_dirty(wm2200->regmap);
> + gpiod_set_value_cansleep(wm2200->ldo_ena, 0);
> + regulator_bulk_disable(ARRAY_SIZE(wm2200->core_supplies),
> + wm2200->core_supplies);
> + return ret;
> + }
>
> return 0;
> }
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
next prev parent reply other threads:[~2026-07-06 9:00 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-04 3:48 [PATCH 00/19] ASoC: codecs: propagate regcache_sync() failures Pengpeng Hou
2026-07-04 3:49 ` [PATCH 01/19] ASoC: codecs: lpass-rx-macro: Propagate regcache_sync() errors Pengpeng Hou
2026-07-04 3:50 ` [PATCH 02/19] ASoC: codecs: lpass-tx-macro: " Pengpeng Hou
2026-07-04 3:51 ` [PATCH 03/19] ASoC: codecs: lpass-wsa-macro: " Pengpeng Hou
2026-07-04 3:52 ` [PATCH 04/19] ASoC: codecs: max98373: " Pengpeng Hou
2026-07-04 3:53 ` [PATCH 05/19] ASoC: codecs: max98388: " Pengpeng Hou
2026-07-04 3:54 ` [PATCH 06/19] ASoC: codecs: rt1318-sdw: " Pengpeng Hou
2026-07-04 3:55 ` [PATCH 07/19] ASoC: codecs: rt9120: " Pengpeng Hou
2026-07-04 3:57 ` [PATCH 08/19] ASoC: codecs: tas2552: " Pengpeng Hou
2026-07-04 3:57 ` [PATCH 09/19] ASoC: codecs: tas2783-sdw: " Pengpeng Hou
2026-07-04 3:58 ` [PATCH 10/19] ASoC: codecs: wcd938x-sdw: " Pengpeng Hou
2026-07-04 3:59 ` [PATCH 11/19] ASoC: codecs: cs35l32: " Pengpeng Hou
2026-07-04 4:00 ` [PATCH 12/19] ASoC: codecs: wm2200: " Pengpeng Hou
2026-07-06 9:00 ` Richard Fitzgerald [this message]
2026-07-04 4:01 ` [PATCH 13/19] ASoC: codecs: wm5100: " Pengpeng Hou
2026-07-04 4:02 ` [PATCH 14/19] ASoC: codecs: wm8962: " Pengpeng Hou
2026-07-06 9:11 ` Richard Fitzgerald
2026-07-06 12:37 ` Mark Brown
2026-07-04 4:03 ` [PATCH 15/19] ASoC: codecs: cs4349: " Pengpeng Hou
2026-07-06 9:03 ` Richard Fitzgerald
2026-07-04 4:04 ` [PATCH 16/19] ASoC: codecs: rt1320-sdw: " Pengpeng Hou
2026-07-04 4:05 ` [PATCH 17/19] ASoC: codecs: rt5682-sdw: " Pengpeng Hou
2026-07-04 4:06 ` [PATCH 18/19] ASoC: codecs: max98396: Unwind supplies on resume failure Pengpeng Hou
2026-07-04 4:07 ` [PATCH 19/19] ASoC: codecs: max98090: Propagate runtime regcache_sync() errors Pengpeng Hou
2026-07-09 16:46 ` (subset) [PATCH 00/19] ASoC: codecs: propagate regcache_sync() failures 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=44917230-34d0-4305-a07b-2cc86d608683@opensource.cirrus.com \
--to=rf@opensource.cirrus.com \
--cc=baojun.xu@ti.com \
--cc=brgl@kernel.org \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=david.rhodes@cirrus.com \
--cc=kevin-lu@ti.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=oder_chiou@realtek.com \
--cc=patches@opensource.cirrus.com \
--cc=pengpeng@iscas.ac.cn \
--cc=perex@perex.cz \
--cc=sebastian.krzyszkowiak@puri.sm \
--cc=sharq0406@gmail.com \
--cc=shenghao-ding@ti.com \
--cc=shengjiu.wang@nxp.com \
--cc=srini@kernel.org \
--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®