From: Pengpeng Hou <pengpeng@iscas.ac.cn>
To: 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>,
Richard Fitzgerald <rf@opensource.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>,
Pengpeng Hou <pengpeng@iscas.ac.cn>
Subject: [PATCH 19/19] ASoC: codecs: max98090: Propagate runtime regcache_sync() errors
Date: Sat, 4 Jul 2026 12:07:47 +0800 [thread overview]
Message-ID: <20260704040747.56587-1-pengpeng@iscas.ac.cn> (raw)
In-Reply-To: <20260704034845.14291-1-pengpeng@iscas.ac.cn>
max98090_runtime_suspend() puts the regmap into cache-only mode. Runtime
resume clears cache-only mode, resets the device, and replays cached
register state with regcache_sync(), but currently ignores a failed
replay.
Return the sync error and restore cache-only/dirty state before failing
runtime resume. This deliberately leaves the separate system-resume sync
call unchanged because the source does not provide an equally strong
paired system suspend/cache-only proof for that path.
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
---
sound/soc/codecs/max98090.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
index da416329b038..53f8894db9e0 100644
--- a/sound/soc/codecs/max98090.c
+++ b/sound/soc/codecs/max98090.c
@@ -2645,12 +2645,18 @@ static void max98090_i2c_remove(struct i2c_client *client)
static int max98090_runtime_resume(struct device *dev)
{
struct max98090_priv *max98090 = dev_get_drvdata(dev);
+ int ret;
regcache_cache_only(max98090->regmap, false);
max98090_reset(max98090);
- regcache_sync(max98090->regmap);
+ ret = regcache_sync(max98090->regmap);
+ if (ret < 0) {
+ regcache_cache_only(max98090->regmap, true);
+ regcache_mark_dirty(max98090->regmap);
+ return ret;
+ }
return 0;
}
--
2.43.0
prev parent reply other threads:[~2026-07-04 4:08 UTC|newest]
Thread overview: 24+ 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
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 ` Pengpeng Hou [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=20260704040747.56587-1-pengpeng@iscas.ac.cn \
--to=pengpeng@iscas.ac.cn \
--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=perex@perex.cz \
--cc=rf@opensource.cirrus.com \
--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