* [PATCH 00/19] ASoC: codecs: propagate regcache_sync() failures
@ 2026-07-04 3:48 Pengpeng Hou
2026-07-04 3:49 ` [PATCH 01/19] ASoC: codecs: lpass-rx-macro: Propagate regcache_sync() errors Pengpeng Hou
` (18 more replies)
0 siblings, 19 replies; 24+ messages in thread
From: Pengpeng Hou @ 2026-07-04 3:48 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown
Cc: Srinivas Kandagatla, Jaroslav Kysela, Takashi Iwai, linux-sound,
linux-arm-msm, linux-kernel, Oder Chiou, Shenghao Ding, Kevin Lu,
Baojun Xu, David Rhodes, Richard Fitzgerald, patches,
Bartosz Golaszewski, Kuninori Morimoto, Charles Keepax,
Sebastian Krzyszkowiak, Shengjiu Wang, Sharique Mohammad,
Pengpeng Hou
Several ASoC codec resume and reattach paths replay cached register
state with regcache_sync() after power loss, reset, runtime resume, or
SoundWire reattach. These paths currently drop regcache_sync() failures
and can report success even when cached register state was not written
back to hardware.
Propagate regcache_sync() failures from the reviewed paths and restore
cache-only/dirty state or unwind resources before returning errors. Most
patches are local resume-path error propagation. Four patches also close
failure-path issues that were held during earlier review: rt1320-sdw
restores both regmaps, rt5682-sdw restores first-init cache state,
max98396 unwinds supplies acquired during resume, and max98090 is limited
to the runtime-resume path with the stronger paired suspend/resume proof.
This series is source-audited only. I did not test on the affected
hardware.
Pengpeng Hou (19):
ASoC: codecs: lpass-rx-macro: Propagate regcache_sync() errors
ASoC: codecs: lpass-tx-macro: Propagate regcache_sync() errors
ASoC: codecs: lpass-wsa-macro: Propagate regcache_sync() errors
ASoC: codecs: max98373: Propagate regcache_sync() errors
ASoC: codecs: max98388: Propagate regcache_sync() errors
ASoC: codecs: rt1318-sdw: Propagate regcache_sync() errors
ASoC: codecs: rt9120: Propagate regcache_sync() errors
ASoC: codecs: tas2552: Propagate regcache_sync() errors
ASoC: codecs: tas2783-sdw: Propagate regcache_sync() errors
ASoC: codecs: wcd938x-sdw: Propagate regcache_sync() errors
ASoC: codecs: cs35l32: Propagate regcache_sync() errors
ASoC: codecs: wm2200: Propagate regcache_sync() errors
ASoC: codecs: wm5100: Propagate regcache_sync() errors
ASoC: codecs: wm8962: Propagate regcache_sync() errors
ASoC: codecs: cs4349: Propagate regcache_sync() errors
ASoC: codecs: rt1320-sdw: Propagate regcache_sync() errors
ASoC: codecs: rt5682-sdw: Propagate regcache_sync() errors
ASoC: codecs: max98396: Unwind supplies on resume failure
ASoC: codecs: max98090: Propagate runtime regcache_sync() errors
sound/soc/codecs/cs35l32.c | 10 +++++++++-
sound/soc/codecs/cs4349.c | 8 +++++++-
sound/soc/codecs/lpass-rx-macro.c | 31 +++++++++++++++++++++---------
sound/soc/codecs/lpass-tx-macro.c | 25 +++++++++++++++++-------
sound/soc/codecs/lpass-wsa-macro.c | 28 ++++++++++++++++++++-------
sound/soc/codecs/max98090.c | 8 +++++++-
sound/soc/codecs/max98373-i2c.c | 9 ++++++++-
sound/soc/codecs/max98388.c | 8 +++++++-
sound/soc/codecs/max98396.c | 24 ++++++++++++++++++++---
sound/soc/codecs/rt1318-sdw.c | 7 ++++++-
sound/soc/codecs/rt1320-sdw.c | 17 ++++++++++++++--
sound/soc/codecs/rt5682-sdw.c | 20 +++++++++++++++++--
sound/soc/codecs/rt9120.c | 9 ++++++++-
sound/soc/codecs/tas2552.c | 10 +++++++++-
sound/soc/codecs/tas2783-sdw.c | 16 +++++++++++++--
sound/soc/codecs/wcd938x-sdw.c | 8 +++++++-
sound/soc/codecs/wm2200.c | 10 +++++++++-
sound/soc/codecs/wm5100.c | 10 +++++++++-
sound/soc/codecs/wm8962.c | 9 ++++++++-
19 files changed, 223 insertions(+), 44 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 01/19] ASoC: codecs: lpass-rx-macro: Propagate regcache_sync() errors
2026-07-04 3:48 [PATCH 00/19] ASoC: codecs: propagate regcache_sync() failures Pengpeng Hou
@ 2026-07-04 3:49 ` Pengpeng Hou
2026-07-04 3:50 ` [PATCH 02/19] ASoC: codecs: lpass-tx-macro: " Pengpeng Hou
` (17 subsequent siblings)
18 siblings, 0 replies; 24+ messages in thread
From: Pengpeng Hou @ 2026-07-04 3:49 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown
Cc: Srinivas Kandagatla, Jaroslav Kysela, Takashi Iwai, linux-sound,
linux-arm-msm, linux-kernel, Oder Chiou, Shenghao Ding, Kevin Lu,
Baojun Xu, David Rhodes, Richard Fitzgerald, patches,
Bartosz Golaszewski, Kuninori Morimoto, Charles Keepax,
Sebastian Krzyszkowiak, Shengjiu Wang, Sharique Mohammad,
Pengpeng Hou
regcache_sync() can fail while replaying cached register state. The RX
macro MCLK helper and runtime resume path currently ignore that failure
and report success.
Propagate the error from the MCLK helper users and from runtime resume.
If runtime resume fails after enabling clocks, restore cache-only/dirty
state and unwind the clocks acquired by the resume path.
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
---
sound/soc/codecs/lpass-rx-macro.c | 31 ++++++++++++++++++++++---------
1 file changed, 22 insertions(+), 9 deletions(-)
diff --git a/sound/soc/codecs/lpass-rx-macro.c b/sound/soc/codecs/lpass-rx-macro.c
index 6233aa9f5bc6..550fc76109c6 100644
--- a/sound/soc/codecs/lpass-rx-macro.c
+++ b/sound/soc/codecs/lpass-rx-macro.c
@@ -2030,9 +2030,10 @@ static struct snd_soc_dai_driver rx_macro_dai[] = {
},
};
-static void rx_macro_mclk_enable(struct rx_macro *rx, bool mclk_enable)
+static int rx_macro_mclk_enable(struct rx_macro *rx, bool mclk_enable)
{
struct regmap *regmap = rx->regmap;
+ int ret;
if (mclk_enable) {
if (rx->rx_mclk_users == 0) {
@@ -2047,14 +2048,16 @@ static void rx_macro_mclk_enable(struct rx_macro *rx, bool mclk_enable)
CDC_RX_FS_MCLK_CNT_EN_MASK,
CDC_RX_FS_MCLK_CNT_ENABLE);
regcache_mark_dirty(regmap);
- regcache_sync(regmap);
+ ret = regcache_sync(regmap);
+ if (ret)
+ return ret;
}
rx->rx_mclk_users++;
} else {
if (rx->rx_mclk_users <= 0) {
dev_err(rx->dev, "%s: clock already disabled\n", __func__);
rx->rx_mclk_users = 0;
- return;
+ return 0;
}
rx->rx_mclk_users--;
if (rx->rx_mclk_users == 0) {
@@ -2068,6 +2071,8 @@ static void rx_macro_mclk_enable(struct rx_macro *rx, bool mclk_enable)
CDC_RX_CLK_MCLK2_EN_MASK, 0x0);
}
}
+
+ return 0;
}
static int rx_macro_mclk_event(struct snd_soc_dapm_widget *w,
@@ -2079,11 +2084,9 @@ static int rx_macro_mclk_event(struct snd_soc_dapm_widget *w,
switch (event) {
case SND_SOC_DAPM_PRE_PMU:
- rx_macro_mclk_enable(rx, true);
- break;
+ return rx_macro_mclk_enable(rx, true);
case SND_SOC_DAPM_POST_PMD:
- rx_macro_mclk_enable(rx, false);
- break;
+ return rx_macro_mclk_enable(rx, false);
default:
dev_err(component->dev, "%s: invalid DAPM event %d\n", __func__, event);
ret = -EINVAL;
@@ -3677,7 +3680,11 @@ static int swclk_gate_enable(struct clk_hw *hw)
return ret;
}
- rx_macro_mclk_enable(rx, true);
+ ret = rx_macro_mclk_enable(rx, true);
+ if (ret) {
+ clk_disable_unprepare(rx->mclk);
+ return ret;
+ }
regmap_update_bits(rx->regmap, CDC_RX_CLK_RST_CTRL_SWR_CONTROL,
CDC_RX_SWR_CLK_EN_MASK, 1);
@@ -4003,9 +4010,15 @@ static int rx_macro_runtime_resume(struct device *dev)
goto err_fsgen;
}
regcache_cache_only(rx->regmap, false);
- regcache_sync(rx->regmap);
+ ret = regcache_sync(rx->regmap);
+ if (ret)
+ goto err_sync;
return 0;
+err_sync:
+ regcache_cache_only(rx->regmap, true);
+ regcache_mark_dirty(rx->regmap);
+ clk_disable_unprepare(rx->fsgen);
err_fsgen:
clk_disable_unprepare(rx->npl);
err_npl:
--
2.43.0
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 02/19] ASoC: codecs: lpass-tx-macro: Propagate regcache_sync() errors
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 ` Pengpeng Hou
2026-07-04 3:51 ` [PATCH 03/19] ASoC: codecs: lpass-wsa-macro: " Pengpeng Hou
` (16 subsequent siblings)
18 siblings, 0 replies; 24+ messages in thread
From: Pengpeng Hou @ 2026-07-04 3:50 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown
Cc: Srinivas Kandagatla, Jaroslav Kysela, Takashi Iwai, linux-sound,
linux-arm-msm, linux-kernel, Oder Chiou, Shenghao Ding, Kevin Lu,
Baojun Xu, David Rhodes, Richard Fitzgerald, patches,
Bartosz Golaszewski, Kuninori Morimoto, Charles Keepax,
Sebastian Krzyszkowiak, Shengjiu Wang, Sharique Mohammad,
Pengpeng Hou
regcache_sync() can fail while replaying cached register state. The TX
macro MCLK helper and runtime resume path currently ignore that failure
and report success.
Propagate the error from the MCLK helper users and from runtime resume.
If runtime resume fails after enabling clocks, restore cache-only/dirty
state and unwind the clocks acquired by the resume path.
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
---
sound/soc/codecs/lpass-tx-macro.c | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/sound/soc/codecs/lpass-tx-macro.c b/sound/soc/codecs/lpass-tx-macro.c
index f7d168f557dd..b6b5ef802035 100644
--- a/sound/soc/codecs/lpass-tx-macro.c
+++ b/sound/soc/codecs/lpass-tx-macro.c
@@ -614,6 +614,7 @@ static int tx_macro_mclk_enable(struct tx_macro *tx,
bool mclk_enable)
{
struct regmap *regmap = tx->regmap;
+ int ret;
if (mclk_enable) {
if (tx->tx_mclk_users == 0) {
@@ -626,7 +627,9 @@ static int tx_macro_mclk_enable(struct tx_macro *tx,
CDC_TX_FS_CNT_EN_MASK,
CDC_TX_FS_CNT_ENABLE);
regcache_mark_dirty(regmap);
- regcache_sync(regmap);
+ ret = regcache_sync(regmap);
+ if (ret)
+ return ret;
}
tx->tx_mclk_users++;
} else {
@@ -739,11 +742,9 @@ static int tx_macro_mclk_event(struct snd_soc_dapm_widget *w,
switch (event) {
case SND_SOC_DAPM_PRE_PMU:
- tx_macro_mclk_enable(tx, true);
- break;
+ return tx_macro_mclk_enable(tx, true);
case SND_SOC_DAPM_POST_PMD:
- tx_macro_mclk_enable(tx, false);
- break;
+ return tx_macro_mclk_enable(tx, false);
default:
break;
}
@@ -2155,7 +2156,11 @@ static int swclk_gate_enable(struct clk_hw *hw)
return ret;
}
- tx_macro_mclk_enable(tx, true);
+ ret = tx_macro_mclk_enable(tx, true);
+ if (ret) {
+ clk_disable_unprepare(tx->mclk);
+ return ret;
+ }
regmap_update_bits(regmap, CDC_TX_CLK_RST_CTRL_SWR_CONTROL,
CDC_TX_SWR_CLK_EN_MASK,
@@ -2437,9 +2442,15 @@ static int tx_macro_runtime_resume(struct device *dev)
}
regcache_cache_only(tx->regmap, false);
- regcache_sync(tx->regmap);
+ ret = regcache_sync(tx->regmap);
+ if (ret)
+ goto err_sync;
return 0;
+err_sync:
+ regcache_cache_only(tx->regmap, true);
+ regcache_mark_dirty(tx->regmap);
+ clk_disable_unprepare(tx->fsgen);
err_fsgen:
clk_disable_unprepare(tx->npl);
err_npl:
--
2.43.0
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 03/19] ASoC: codecs: lpass-wsa-macro: Propagate regcache_sync() errors
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 ` Pengpeng Hou
2026-07-04 3:52 ` [PATCH 04/19] ASoC: codecs: max98373: " Pengpeng Hou
` (15 subsequent siblings)
18 siblings, 0 replies; 24+ messages in thread
From: Pengpeng Hou @ 2026-07-04 3:51 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown
Cc: Srinivas Kandagatla, Jaroslav Kysela, Takashi Iwai, linux-sound,
linux-arm-msm, linux-kernel, Oder Chiou, Shenghao Ding, Kevin Lu,
Baojun Xu, David Rhodes, Richard Fitzgerald, patches,
Bartosz Golaszewski, Kuninori Morimoto, Charles Keepax,
Sebastian Krzyszkowiak, Shengjiu Wang, Sharique Mohammad,
Pengpeng Hou
regcache_sync() can fail while replaying cached register state. The WSA
macro MCLK helper and runtime resume path currently ignore that failure
and report success.
Propagate the error from the MCLK helper users and from runtime resume.
If runtime resume fails after enabling clocks, restore cache-only/dirty
state and unwind the clocks acquired by the resume path.
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
---
sound/soc/codecs/lpass-wsa-macro.c | 28 +++++++++++++++++++++-------
1 file changed, 21 insertions(+), 7 deletions(-)
diff --git a/sound/soc/codecs/lpass-wsa-macro.c b/sound/soc/codecs/lpass-wsa-macro.c
index 5ad0448af649..59786316b49a 100644
--- a/sound/soc/codecs/lpass-wsa-macro.c
+++ b/sound/soc/codecs/lpass-wsa-macro.c
@@ -1408,14 +1408,17 @@ static struct snd_soc_dai_driver wsa_macro_dai[] = {
},
};
-static void wsa_macro_mclk_enable(struct wsa_macro *wsa, bool mclk_enable)
+static int wsa_macro_mclk_enable(struct wsa_macro *wsa, bool mclk_enable)
{
struct regmap *regmap = wsa->regmap;
+ int ret;
if (mclk_enable) {
if (wsa->wsa_mclk_users == 0) {
regcache_mark_dirty(regmap);
- regcache_sync(regmap);
+ ret = regcache_sync(regmap);
+ if (ret)
+ return ret;
/* 9.6MHz MCLK, set value 0x00 if other frequency */
regmap_update_bits(regmap, CDC_WSA_TOP_FREQ_MCLK, 0x01, 0x01);
regmap_update_bits(regmap,
@@ -1432,7 +1435,7 @@ static void wsa_macro_mclk_enable(struct wsa_macro *wsa, bool mclk_enable)
if (wsa->wsa_mclk_users <= 0) {
dev_err(wsa->dev, "clock already disabled\n");
wsa->wsa_mclk_users = 0;
- return;
+ return 0;
}
wsa->wsa_mclk_users--;
if (wsa->wsa_mclk_users == 0) {
@@ -1446,6 +1449,8 @@ static void wsa_macro_mclk_enable(struct wsa_macro *wsa, bool mclk_enable)
CDC_WSA_MCLK_DISABLE);
}
}
+
+ return 0;
}
static void wsa_macro_enable_disable_vi_sense(struct snd_soc_component *component, bool enable,
@@ -1515,8 +1520,7 @@ static int wsa_macro_mclk_event(struct snd_soc_dapm_widget *w,
struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
struct wsa_macro *wsa = snd_soc_component_get_drvdata(component);
- wsa_macro_mclk_enable(wsa, event == SND_SOC_DAPM_PRE_PMU);
- return 0;
+ return wsa_macro_mclk_enable(wsa, event == SND_SOC_DAPM_PRE_PMU);
}
static int wsa_macro_enable_vi_feedback(struct snd_soc_dapm_widget *w,
@@ -2538,7 +2542,11 @@ static int wsa_swrm_clock(struct wsa_macro *wsa, bool enable)
dev_err(wsa->dev, "failed to enable mclk\n");
return ret;
}
- wsa_macro_mclk_enable(wsa, true);
+ ret = wsa_macro_mclk_enable(wsa, true);
+ if (ret) {
+ clk_disable_unprepare(wsa->mclk);
+ return ret;
+ }
regmap_update_bits(regmap, CDC_WSA_CLK_RST_CTRL_SWR_CONTROL,
CDC_WSA_SWR_CLK_EN_MASK,
@@ -2887,9 +2895,15 @@ static int wsa_macro_runtime_resume(struct device *dev)
}
regcache_cache_only(wsa->regmap, false);
- regcache_sync(wsa->regmap);
+ ret = regcache_sync(wsa->regmap);
+ if (ret)
+ goto err_sync;
return 0;
+err_sync:
+ regcache_cache_only(wsa->regmap, true);
+ regcache_mark_dirty(wsa->regmap);
+ clk_disable_unprepare(wsa->fsgen);
err_fsgen:
clk_disable_unprepare(wsa->npl);
err_npl:
--
2.43.0
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 04/19] ASoC: codecs: max98373: Propagate regcache_sync() errors
2026-07-04 3:48 [PATCH 00/19] ASoC: codecs: propagate regcache_sync() failures Pengpeng Hou
` (2 preceding siblings ...)
2026-07-04 3:51 ` [PATCH 03/19] ASoC: codecs: lpass-wsa-macro: " Pengpeng Hou
@ 2026-07-04 3:52 ` Pengpeng Hou
2026-07-04 3:53 ` [PATCH 05/19] ASoC: codecs: max98388: " Pengpeng Hou
` (14 subsequent siblings)
18 siblings, 0 replies; 24+ messages in thread
From: Pengpeng Hou @ 2026-07-04 3:52 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown
Cc: Srinivas Kandagatla, Jaroslav Kysela, Takashi Iwai, linux-sound,
linux-arm-msm, linux-kernel, Oder Chiou, Shenghao Ding, Kevin Lu,
Baojun Xu, David Rhodes, Richard Fitzgerald, patches,
Bartosz Golaszewski, Kuninori Morimoto, Charles Keepax,
Sebastian Krzyszkowiak, Shengjiu Wang, Sharique Mohammad,
Pengpeng Hou
regcache_sync() can fail while replaying cached register state after
resume. max98373_resume() currently ignores that failure and returns
success.
Propagate the error and restore cache-only/dirty state on failure.
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
---
sound/soc/codecs/max98373-i2c.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/max98373-i2c.c b/sound/soc/codecs/max98373-i2c.c
index 8805bd01153c..cbd7ebffa6d6 100644
--- a/sound/soc/codecs/max98373-i2c.c
+++ b/sound/soc/codecs/max98373-i2c.c
@@ -488,10 +488,17 @@ static int max98373_suspend(struct device *dev)
static int max98373_resume(struct device *dev)
{
struct max98373_priv *max98373 = dev_get_drvdata(dev);
+ int ret;
regcache_cache_only(max98373->regmap, false);
max98373_reset(max98373, dev);
- regcache_sync(max98373->regmap);
+ ret = regcache_sync(max98373->regmap);
+ if (ret) {
+ regcache_cache_only(max98373->regmap, true);
+ regcache_mark_dirty(max98373->regmap);
+ return ret;
+ }
+
return 0;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 05/19] ASoC: codecs: max98388: Propagate regcache_sync() errors
2026-07-04 3:48 [PATCH 00/19] ASoC: codecs: propagate regcache_sync() failures Pengpeng Hou
` (3 preceding siblings ...)
2026-07-04 3:52 ` [PATCH 04/19] ASoC: codecs: max98373: " Pengpeng Hou
@ 2026-07-04 3:53 ` Pengpeng Hou
2026-07-04 3:54 ` [PATCH 06/19] ASoC: codecs: rt1318-sdw: " Pengpeng Hou
` (13 subsequent siblings)
18 siblings, 0 replies; 24+ messages in thread
From: Pengpeng Hou @ 2026-07-04 3:53 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown
Cc: Srinivas Kandagatla, Jaroslav Kysela, Takashi Iwai, linux-sound,
linux-arm-msm, linux-kernel, Oder Chiou, Shenghao Ding, Kevin Lu,
Baojun Xu, David Rhodes, Richard Fitzgerald, patches,
Bartosz Golaszewski, Kuninori Morimoto, Charles Keepax,
Sebastian Krzyszkowiak, Shengjiu Wang, Sharique Mohammad,
Pengpeng Hou
regcache_sync() can fail while replaying cached register state after
resume. max98388_resume() currently ignores that failure and returns
success.
Propagate the error and restore cache-only/dirty state on failure.
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
---
sound/soc/codecs/max98388.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/max98388.c b/sound/soc/codecs/max98388.c
index a4c57152d25f..d97dab41bf0f 100644
--- a/sound/soc/codecs/max98388.c
+++ b/sound/soc/codecs/max98388.c
@@ -863,10 +863,16 @@ static int max98388_suspend(struct device *dev)
static int max98388_resume(struct device *dev)
{
struct max98388_priv *max98388 = dev_get_drvdata(dev);
+ int ret;
regcache_cache_only(max98388->regmap, false);
max98388_reset(max98388, dev);
- regcache_sync(max98388->regmap);
+ ret = regcache_sync(max98388->regmap);
+ if (ret) {
+ regcache_cache_only(max98388->regmap, true);
+ regcache_mark_dirty(max98388->regmap);
+ return ret;
+ }
return 0;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 06/19] ASoC: codecs: rt1318-sdw: Propagate regcache_sync() errors
2026-07-04 3:48 [PATCH 00/19] ASoC: codecs: propagate regcache_sync() failures Pengpeng Hou
` (4 preceding siblings ...)
2026-07-04 3:53 ` [PATCH 05/19] ASoC: codecs: max98388: " Pengpeng Hou
@ 2026-07-04 3:54 ` Pengpeng Hou
2026-07-04 3:55 ` [PATCH 07/19] ASoC: codecs: rt9120: " Pengpeng Hou
` (12 subsequent siblings)
18 siblings, 0 replies; 24+ messages in thread
From: Pengpeng Hou @ 2026-07-04 3:54 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown
Cc: Srinivas Kandagatla, Jaroslav Kysela, Takashi Iwai, linux-sound,
linux-arm-msm, linux-kernel, Oder Chiou, Shenghao Ding, Kevin Lu,
Baojun Xu, David Rhodes, Richard Fitzgerald, patches,
Bartosz Golaszewski, Kuninori Morimoto, Charles Keepax,
Sebastian Krzyszkowiak, Shengjiu Wang, Sharique Mohammad,
Pengpeng Hou
regcache_sync() can fail while replaying cached register state after the
SoundWire slave has reinitialized. rt1318_dev_resume() currently ignores
that failure and returns success.
Propagate the error and restore cache-only/dirty state on failure.
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
---
sound/soc/codecs/rt1318-sdw.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/rt1318-sdw.c b/sound/soc/codecs/rt1318-sdw.c
index c038ac0e3b76..ef18cd63d461 100644
--- a/sound/soc/codecs/rt1318-sdw.c
+++ b/sound/soc/codecs/rt1318-sdw.c
@@ -830,7 +830,12 @@ static int rt1318_dev_resume(struct device *dev)
return ret;
regcache_cache_only(rt1318->regmap, false);
- regcache_sync(rt1318->regmap);
+ ret = regcache_sync(rt1318->regmap);
+ if (ret) {
+ regcache_cache_only(rt1318->regmap, true);
+ regcache_mark_dirty(rt1318->regmap);
+ return ret;
+ }
return 0;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 07/19] ASoC: codecs: rt9120: Propagate regcache_sync() errors
2026-07-04 3:48 [PATCH 00/19] ASoC: codecs: propagate regcache_sync() failures Pengpeng Hou
` (5 preceding siblings ...)
2026-07-04 3:54 ` [PATCH 06/19] ASoC: codecs: rt1318-sdw: " Pengpeng Hou
@ 2026-07-04 3:55 ` Pengpeng Hou
2026-07-04 3:57 ` [PATCH 08/19] ASoC: codecs: tas2552: " Pengpeng Hou
` (11 subsequent siblings)
18 siblings, 0 replies; 24+ messages in thread
From: Pengpeng Hou @ 2026-07-04 3:55 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown
Cc: Srinivas Kandagatla, Jaroslav Kysela, Takashi Iwai, linux-sound,
linux-arm-msm, linux-kernel, Oder Chiou, Shenghao Ding, Kevin Lu,
Baojun Xu, David Rhodes, Richard Fitzgerald, patches,
Bartosz Golaszewski, Kuninori Morimoto, Charles Keepax,
Sebastian Krzyszkowiak, Shengjiu Wang, Sharique Mohammad,
Pengpeng Hou
regcache_sync() can fail while replaying cached register state after
runtime resume. rt9120_runtime_resume() currently ignores that failure
and returns success.
Propagate the error, restore cache-only/dirty state, and power the
device back down on sync failure.
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
---
sound/soc/codecs/rt9120.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/rt9120.c b/sound/soc/codecs/rt9120.c
index 97f56af25577..e51cd4a31894 100644
--- a/sound/soc/codecs/rt9120.c
+++ b/sound/soc/codecs/rt9120.c
@@ -606,12 +606,19 @@ static int rt9120_runtime_suspend(struct device *dev)
static int rt9120_runtime_resume(struct device *dev)
{
struct rt9120_data *data = dev_get_drvdata(dev);
+ int ret;
if (data->pwdnn_gpio) {
gpiod_set_value(data->pwdnn_gpio, 1);
msleep(RT9120_CHIPON_WAITMS);
regcache_cache_only(data->regmap, false);
- regcache_sync(data->regmap);
+ ret = regcache_sync(data->regmap);
+ if (ret) {
+ regcache_cache_only(data->regmap, true);
+ regcache_mark_dirty(data->regmap);
+ gpiod_set_value(data->pwdnn_gpio, 0);
+ return ret;
+ }
}
return 0;
--
2.43.0
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 08/19] ASoC: codecs: tas2552: Propagate regcache_sync() errors
2026-07-04 3:48 [PATCH 00/19] ASoC: codecs: propagate regcache_sync() failures Pengpeng Hou
` (6 preceding siblings ...)
2026-07-04 3:55 ` [PATCH 07/19] ASoC: codecs: rt9120: " Pengpeng Hou
@ 2026-07-04 3:57 ` Pengpeng Hou
2026-07-04 3:57 ` [PATCH 09/19] ASoC: codecs: tas2783-sdw: " Pengpeng Hou
` (10 subsequent siblings)
18 siblings, 0 replies; 24+ messages in thread
From: Pengpeng Hou @ 2026-07-04 3:57 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown
Cc: Srinivas Kandagatla, Jaroslav Kysela, Takashi Iwai, linux-sound,
linux-arm-msm, linux-kernel, Oder Chiou, Shenghao Ding, Kevin Lu,
Baojun Xu, David Rhodes, Richard Fitzgerald, patches,
Bartosz Golaszewski, Kuninori Morimoto, Charles Keepax,
Sebastian Krzyszkowiak, Shengjiu Wang, Sharique Mohammad,
Pengpeng Hou
regcache_sync() can fail while replaying cached register state after
runtime resume. tas2552_runtime_resume() currently ignores that failure
and returns success.
Propagate the error, restore cache-only/dirty state, and put the
amplifier back into shutdown on sync failure.
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
---
sound/soc/codecs/tas2552.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c
index 1a7650b9b2a7..22f93e29454f 100644
--- a/sound/soc/codecs/tas2552.c
+++ b/sound/soc/codecs/tas2552.c
@@ -495,13 +495,21 @@ static int tas2552_runtime_suspend(struct device *dev)
static int tas2552_runtime_resume(struct device *dev)
{
struct tas2552_data *tas2552 = dev_get_drvdata(dev);
+ int ret;
gpiod_set_value_cansleep(tas2552->enable_gpio, 1);
tas2552_sw_shutdown(tas2552, 0);
regcache_cache_only(tas2552->regmap, false);
- regcache_sync(tas2552->regmap);
+ ret = regcache_sync(tas2552->regmap);
+ if (ret) {
+ regcache_cache_only(tas2552->regmap, true);
+ regcache_mark_dirty(tas2552->regmap);
+ tas2552_sw_shutdown(tas2552, 1);
+ gpiod_set_value_cansleep(tas2552->enable_gpio, 0);
+ return ret;
+ }
return 0;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 09/19] ASoC: codecs: tas2783-sdw: Propagate regcache_sync() errors
2026-07-04 3:48 [PATCH 00/19] ASoC: codecs: propagate regcache_sync() failures Pengpeng Hou
` (7 preceding siblings ...)
2026-07-04 3:57 ` [PATCH 08/19] ASoC: codecs: tas2552: " Pengpeng Hou
@ 2026-07-04 3:57 ` Pengpeng Hou
2026-07-04 3:58 ` [PATCH 10/19] ASoC: codecs: wcd938x-sdw: " Pengpeng Hou
` (9 subsequent siblings)
18 siblings, 0 replies; 24+ messages in thread
From: Pengpeng Hou @ 2026-07-04 3:57 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown
Cc: Srinivas Kandagatla, Jaroslav Kysela, Takashi Iwai, linux-sound,
linux-arm-msm, linux-kernel, Oder Chiou, Shenghao Ding, Kevin Lu,
Baojun Xu, David Rhodes, Richard Fitzgerald, patches,
Bartosz Golaszewski, Kuninori Morimoto, Charles Keepax,
Sebastian Krzyszkowiak, Shengjiu Wang, Sharique Mohammad,
Pengpeng Hou
regcache_sync() can fail while replaying cached register state after
SoundWire resume or attach handling. tas2783 currently ignores that
failure.
Propagate the error and restore cache-only/dirty state on failure.
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
---
sound/soc/codecs/tas2783-sdw.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/tas2783-sdw.c b/sound/soc/codecs/tas2783-sdw.c
index 3d0b116544cc..db58c50e8a83 100644
--- a/sound/soc/codecs/tas2783-sdw.c
+++ b/sound/soc/codecs/tas2783-sdw.c
@@ -1099,7 +1099,13 @@ static s32 tas2783_sdca_dev_resume(struct device *dev)
}
regcache_cache_only(tas_dev->regmap, false);
- regcache_sync(tas_dev->regmap);
+ ret = regcache_sync(tas_dev->regmap);
+ if (ret) {
+ regcache_cache_only(tas_dev->regmap, true);
+ regcache_mark_dirty(tas_dev->regmap);
+ return ret;
+ }
+
return 0;
}
@@ -1210,6 +1216,7 @@ static s32 tas_update_status(struct sdw_slave *slave,
{
struct tas2783_prv *tas_dev = dev_get_drvdata(&slave->dev);
struct device *dev = &slave->dev;
+ int ret;
dev_dbg(dev, "Peripheral status = %s",
status == SDW_SLAVE_UNATTACHED ? "unattached" :
@@ -1227,7 +1234,12 @@ static s32 tas_update_status(struct sdw_slave *slave,
/* updated the cache data to device */
regcache_cache_only(tas_dev->regmap, false);
- regcache_sync(tas_dev->regmap);
+ ret = regcache_sync(tas_dev->regmap);
+ if (ret) {
+ regcache_cache_only(tas_dev->regmap, true);
+ regcache_mark_dirty(tas_dev->regmap);
+ return ret;
+ }
/* perform I/O transfers required for Slave initialization */
return tas_io_init(&slave->dev, slave);
--
2.43.0
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 10/19] ASoC: codecs: wcd938x-sdw: Propagate regcache_sync() errors
2026-07-04 3:48 [PATCH 00/19] ASoC: codecs: propagate regcache_sync() failures Pengpeng Hou
` (8 preceding siblings ...)
2026-07-04 3:57 ` [PATCH 09/19] ASoC: codecs: tas2783-sdw: " Pengpeng Hou
@ 2026-07-04 3:58 ` Pengpeng Hou
2026-07-04 3:59 ` [PATCH 11/19] ASoC: codecs: cs35l32: " Pengpeng Hou
` (8 subsequent siblings)
18 siblings, 0 replies; 24+ messages in thread
From: Pengpeng Hou @ 2026-07-04 3:58 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown
Cc: Srinivas Kandagatla, Jaroslav Kysela, Takashi Iwai, linux-sound,
linux-arm-msm, linux-kernel, Oder Chiou, Shenghao Ding, Kevin Lu,
Baojun Xu, David Rhodes, Richard Fitzgerald, patches,
Bartosz Golaszewski, Kuninori Morimoto, Charles Keepax,
Sebastian Krzyszkowiak, Shengjiu Wang, Sharique Mohammad,
Pengpeng Hou
regcache_sync() can fail while replaying cached register state during
runtime resume. wcd938x_sdw_runtime_resume() currently ignores that
failure.
Propagate the error and restore cache-only/dirty state on failure.
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
---
sound/soc/codecs/wcd938x-sdw.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wcd938x-sdw.c b/sound/soc/codecs/wcd938x-sdw.c
index 0f0cc0ac3056..e5ad368418a2 100644
--- a/sound/soc/codecs/wcd938x-sdw.c
+++ b/sound/soc/codecs/wcd938x-sdw.c
@@ -1245,10 +1245,16 @@ static int wcd938x_sdw_runtime_suspend(struct device *dev)
static int wcd938x_sdw_runtime_resume(struct device *dev)
{
struct wcd938x_sdw_priv *wcd = dev_get_drvdata(dev);
+ int ret;
if (wcd->regmap) {
regcache_cache_only(wcd->regmap, false);
- regcache_sync(wcd->regmap);
+ ret = regcache_sync(wcd->regmap);
+ if (ret) {
+ regcache_cache_only(wcd->regmap, true);
+ regcache_mark_dirty(wcd->regmap);
+ return ret;
+ }
}
pm_runtime_mark_last_busy(dev);
--
2.43.0
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 11/19] ASoC: codecs: cs35l32: Propagate regcache_sync() errors
2026-07-04 3:48 [PATCH 00/19] ASoC: codecs: propagate regcache_sync() failures Pengpeng Hou
` (9 preceding siblings ...)
2026-07-04 3:58 ` [PATCH 10/19] ASoC: codecs: wcd938x-sdw: " Pengpeng Hou
@ 2026-07-04 3:59 ` Pengpeng Hou
2026-07-04 4:00 ` [PATCH 12/19] ASoC: codecs: wm2200: " Pengpeng Hou
` (7 subsequent siblings)
18 siblings, 0 replies; 24+ messages in thread
From: Pengpeng Hou @ 2026-07-04 3:59 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown
Cc: Srinivas Kandagatla, Jaroslav Kysela, Takashi Iwai, linux-sound,
linux-arm-msm, linux-kernel, Oder Chiou, Shenghao Ding, Kevin Lu,
Baojun Xu, David Rhodes, Richard Fitzgerald, patches,
Bartosz Golaszewski, Kuninori Morimoto, Charles Keepax,
Sebastian Krzyszkowiak, Shengjiu Wang, Sharique Mohammad,
Pengpeng Hou
regcache_sync() can fail while replaying cached register state during
runtime resume. cs35l32_runtime_resume() currently ignores that failure.
Propagate the error, restore cache-only/dirty state, and unwind the
reset and supply state acquired by runtime resume.
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
---
sound/soc/codecs/cs35l32.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/cs35l32.c b/sound/soc/codecs/cs35l32.c
index c835088de578..8288fb6d50be 100644
--- a/sound/soc/codecs/cs35l32.c
+++ b/sound/soc/codecs/cs35l32.c
@@ -538,7 +538,15 @@ static int cs35l32_runtime_resume(struct device *dev)
gpiod_set_value_cansleep(cs35l32->reset_gpio, 1);
regcache_cache_only(cs35l32->regmap, false);
- regcache_sync(cs35l32->regmap);
+ ret = regcache_sync(cs35l32->regmap);
+ if (ret) {
+ regcache_cache_only(cs35l32->regmap, true);
+ regcache_mark_dirty(cs35l32->regmap);
+ gpiod_set_value_cansleep(cs35l32->reset_gpio, 0);
+ regulator_bulk_disable(ARRAY_SIZE(cs35l32->supplies),
+ cs35l32->supplies);
+ return ret;
+ }
return 0;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 12/19] ASoC: codecs: wm2200: Propagate regcache_sync() errors
2026-07-04 3:48 [PATCH 00/19] ASoC: codecs: propagate regcache_sync() failures Pengpeng Hou
` (10 preceding siblings ...)
2026-07-04 3:59 ` [PATCH 11/19] ASoC: codecs: cs35l32: " Pengpeng Hou
@ 2026-07-04 4:00 ` Pengpeng Hou
2026-07-06 9:00 ` Richard Fitzgerald
2026-07-04 4:01 ` [PATCH 13/19] ASoC: codecs: wm5100: " Pengpeng Hou
` (6 subsequent siblings)
18 siblings, 1 reply; 24+ messages in thread
From: Pengpeng Hou @ 2026-07-04 4:00 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown
Cc: Srinivas Kandagatla, Jaroslav Kysela, Takashi Iwai, linux-sound,
linux-arm-msm, linux-kernel, Oder Chiou, Shenghao Ding, Kevin Lu,
Baojun Xu, David Rhodes, Richard Fitzgerald, patches,
Bartosz Golaszewski, Kuninori Morimoto, Charles Keepax,
Sebastian Krzyszkowiak, Shengjiu Wang, Sharique Mohammad,
Pengpeng Hou
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;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 13/19] ASoC: codecs: wm5100: Propagate regcache_sync() errors
2026-07-04 3:48 [PATCH 00/19] ASoC: codecs: propagate regcache_sync() failures Pengpeng Hou
` (11 preceding siblings ...)
2026-07-04 4:00 ` [PATCH 12/19] ASoC: codecs: wm2200: " Pengpeng Hou
@ 2026-07-04 4:01 ` Pengpeng Hou
2026-07-04 4:02 ` [PATCH 14/19] ASoC: codecs: wm8962: " Pengpeng Hou
` (5 subsequent siblings)
18 siblings, 0 replies; 24+ messages in thread
From: Pengpeng Hou @ 2026-07-04 4:01 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown
Cc: Srinivas Kandagatla, Jaroslav Kysela, Takashi Iwai, linux-sound,
linux-arm-msm, linux-kernel, Oder Chiou, Shenghao Ding, Kevin Lu,
Baojun Xu, David Rhodes, Richard Fitzgerald, patches,
Bartosz Golaszewski, Kuninori Morimoto, Charles Keepax,
Sebastian Krzyszkowiak, Shengjiu Wang, Sharique Mohammad,
Pengpeng Hou
regcache_sync() can fail while replaying cached register state during
runtime resume. wm5100_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/wm5100.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c
index bd94fa53c362..2fe937a93026 100644
--- a/sound/soc/codecs/wm5100.c
+++ b/sound/soc/codecs/wm5100.c
@@ -2659,7 +2659,15 @@ static int wm5100_runtime_resume(struct device *dev)
}
regcache_cache_only(wm5100->regmap, false);
- regcache_sync(wm5100->regmap);
+ ret = regcache_sync(wm5100->regmap);
+ if (ret) {
+ regcache_cache_only(wm5100->regmap, true);
+ regcache_mark_dirty(wm5100->regmap);
+ gpiod_set_value_cansleep(wm5100->ldo_ena, 0);
+ regulator_bulk_disable(ARRAY_SIZE(wm5100->core_supplies),
+ wm5100->core_supplies);
+ return ret;
+ }
return 0;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 14/19] ASoC: codecs: wm8962: Propagate regcache_sync() errors
2026-07-04 3:48 [PATCH 00/19] ASoC: codecs: propagate regcache_sync() failures Pengpeng Hou
` (12 preceding siblings ...)
2026-07-04 4:01 ` [PATCH 13/19] ASoC: codecs: wm5100: " Pengpeng Hou
@ 2026-07-04 4:02 ` Pengpeng Hou
2026-07-06 9:11 ` Richard Fitzgerald
2026-07-04 4:03 ` [PATCH 15/19] ASoC: codecs: cs4349: " Pengpeng Hou
` (4 subsequent siblings)
18 siblings, 1 reply; 24+ messages in thread
From: Pengpeng Hou @ 2026-07-04 4:02 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown
Cc: Srinivas Kandagatla, Jaroslav Kysela, Takashi Iwai, linux-sound,
linux-arm-msm, linux-kernel, Oder Chiou, Shenghao Ding, Kevin Lu,
Baojun Xu, David Rhodes, Richard Fitzgerald, patches,
Bartosz Golaszewski, Kuninori Morimoto, Charles Keepax,
Sebastian Krzyszkowiak, Shengjiu Wang, Sharique Mohammad,
Pengpeng Hou
regcache_sync() can fail while replaying cached register state during
runtime resume. wm8962_runtime_resume() currently ignores that failure
and continues programming the device.
Propagate the error, restore cache-only/dirty state, and unwind the
supplies and clock acquired by runtime resume.
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
---
sound/soc/codecs/wm8962.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index de18b1f85a32..2db822fc1de7 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -3937,7 +3937,9 @@ static int wm8962_runtime_resume(struct device *dev)
WM8962_OSC_ENA | WM8962_PLL2_ENA | WM8962_PLL3_ENA,
0);
- regcache_sync(wm8962->regmap);
+ ret = regcache_sync(wm8962->regmap);
+ if (ret)
+ goto cache_sync_err;
regmap_update_bits(wm8962->regmap, WM8962_ANTI_POP,
WM8962_STARTUP_BIAS_ENA | WM8962_VMID_BUF_ENA,
@@ -3955,6 +3957,11 @@ static int wm8962_runtime_resume(struct device *dev)
return 0;
+cache_sync_err:
+ regcache_cache_only(wm8962->regmap, true);
+ regcache_mark_dirty(wm8962->regmap);
+ regulator_bulk_disable(ARRAY_SIZE(wm8962->supplies),
+ wm8962->supplies);
disable_clock:
clk_disable_unprepare(wm8962->pdata.mclk);
return ret;
--
2.43.0
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 15/19] ASoC: codecs: cs4349: Propagate regcache_sync() errors
2026-07-04 3:48 [PATCH 00/19] ASoC: codecs: propagate regcache_sync() failures Pengpeng Hou
` (13 preceding siblings ...)
2026-07-04 4:02 ` [PATCH 14/19] ASoC: codecs: wm8962: " Pengpeng Hou
@ 2026-07-04 4:03 ` Pengpeng Hou
2026-07-06 9:03 ` Richard Fitzgerald
2026-07-04 4:04 ` [PATCH 16/19] ASoC: codecs: rt1320-sdw: " Pengpeng Hou
` (3 subsequent siblings)
18 siblings, 1 reply; 24+ messages in thread
From: Pengpeng Hou @ 2026-07-04 4:03 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown
Cc: Srinivas Kandagatla, Jaroslav Kysela, Takashi Iwai, linux-sound,
linux-arm-msm, linux-kernel, Oder Chiou, Shenghao Ding, Kevin Lu,
Baojun Xu, David Rhodes, Richard Fitzgerald, patches,
Bartosz Golaszewski, Kuninori Morimoto, Charles Keepax,
Sebastian Krzyszkowiak, Shengjiu Wang, Sharique Mohammad,
Pengpeng Hou
regcache_sync() can fail while replaying cached register state during
runtime resume. cs4349_runtime_resume() currently ignores that failure
and returns success.
Propagate the error, restore cache-only/dirty state, and hold reset low
again on sync failure.
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
---
sound/soc/codecs/cs4349.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/cs4349.c b/sound/soc/codecs/cs4349.c
index 6ac6d306b054..9a7f70175717 100644
--- a/sound/soc/codecs/cs4349.c
+++ b/sound/soc/codecs/cs4349.c
@@ -340,7 +340,13 @@ static int cs4349_runtime_resume(struct device *dev)
gpiod_set_value_cansleep(cs4349->reset_gpio, 1);
regcache_cache_only(cs4349->regmap, false);
- regcache_sync(cs4349->regmap);
+ ret = regcache_sync(cs4349->regmap);
+ if (ret) {
+ regcache_cache_only(cs4349->regmap, true);
+ regcache_mark_dirty(cs4349->regmap);
+ gpiod_set_value_cansleep(cs4349->reset_gpio, 0);
+ return ret;
+ }
return 0;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 16/19] ASoC: codecs: rt1320-sdw: Propagate regcache_sync() errors
2026-07-04 3:48 [PATCH 00/19] ASoC: codecs: propagate regcache_sync() failures Pengpeng Hou
` (14 preceding siblings ...)
2026-07-04 4:03 ` [PATCH 15/19] ASoC: codecs: cs4349: " Pengpeng Hou
@ 2026-07-04 4:04 ` Pengpeng Hou
2026-07-04 4:05 ` [PATCH 17/19] ASoC: codecs: rt5682-sdw: " Pengpeng Hou
` (2 subsequent siblings)
18 siblings, 0 replies; 24+ messages in thread
From: Pengpeng Hou @ 2026-07-04 4:04 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown
Cc: Srinivas Kandagatla, Jaroslav Kysela, Takashi Iwai, linux-sound,
linux-arm-msm, linux-kernel, Oder Chiou, Shenghao Ding, Kevin Lu,
Baojun Xu, David Rhodes, Richard Fitzgerald, patches,
Bartosz Golaszewski, Kuninori Morimoto, Charles Keepax,
Sebastian Krzyszkowiak, Shengjiu Wang, Sharique Mohammad,
Pengpeng Hou
rt1320_dev_resume() clears cache-only mode for both regmaps and
replays cached register state into the device. Both regcache_sync()
calls currently ignore their return values, so resume can report
success even if either replay failed.
Check both sync operations and return the first error. On failure,
restore both regmaps to cache-only mode and mark both caches dirty,
so a later successful resume attempt starts from a coherent suspended
cache state instead of a partially live pair of regmaps.
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
---
sound/soc/codecs/rt1320-sdw.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/rt1320-sdw.c b/sound/soc/codecs/rt1320-sdw.c
index 1e930b27c67a..b7e2d44ae2fb 100644
--- a/sound/soc/codecs/rt1320-sdw.c
+++ b/sound/soc/codecs/rt1320-sdw.c
@@ -3062,10 +3062,23 @@ static int rt1320_dev_resume(struct device *dev)
return ret;
regcache_cache_only(rt1320->regmap, false);
- regcache_sync(rt1320->regmap);
+ ret = regcache_sync(rt1320->regmap);
+ if (ret)
+ goto err_sync;
+
regcache_cache_only(rt1320->mbq_regmap, false);
- regcache_sync(rt1320->mbq_regmap);
+ ret = regcache_sync(rt1320->mbq_regmap);
+ if (ret)
+ goto err_sync;
+
return 0;
+
+err_sync:
+ regcache_cache_only(rt1320->regmap, true);
+ regcache_cache_only(rt1320->mbq_regmap, true);
+ regcache_mark_dirty(rt1320->regmap);
+ regcache_mark_dirty(rt1320->mbq_regmap);
+ return ret;
}
static const struct dev_pm_ops rt1320_pm = {
--
2.43.0
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 17/19] ASoC: codecs: rt5682-sdw: Propagate regcache_sync() errors
2026-07-04 3:48 [PATCH 00/19] ASoC: codecs: propagate regcache_sync() failures Pengpeng Hou
` (15 preceding siblings ...)
2026-07-04 4:04 ` [PATCH 16/19] ASoC: codecs: rt1320-sdw: " Pengpeng Hou
@ 2026-07-04 4:05 ` 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
18 siblings, 0 replies; 24+ messages in thread
From: Pengpeng Hou @ 2026-07-04 4:05 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown
Cc: Srinivas Kandagatla, Jaroslav Kysela, Takashi Iwai, linux-sound,
linux-arm-msm, linux-kernel, Oder Chiou, Shenghao Ding, Kevin Lu,
Baojun Xu, David Rhodes, Richard Fitzgerald, patches,
Bartosz Golaszewski, Kuninori Morimoto, Charles Keepax,
Sebastian Krzyszkowiak, Shengjiu Wang, Sharique Mohammad,
Pengpeng Hou
rt5682_io_init() and rt5682_dev_resume() both leave cache-only mode
before replaying cached register state with regcache_sync(). Both paths
ignore the sync result, which can hide a failed hardware restore.
Propagate regcache_sync() failures from both paths. The first hardware
init path now has a dedicated sync-failure cleanup that restores cache
bypass, cache-only, and dirty-cache state before balancing the runtime
PM reference. The resume path restores both regmaps to cache-only mode
and marks the main cache dirty before returning the error.
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
---
sound/soc/codecs/rt5682-sdw.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/rt5682-sdw.c b/sound/soc/codecs/rt5682-sdw.c
index dec8c2147d68..e49ec28b6103 100644
--- a/sound/soc/codecs/rt5682-sdw.c
+++ b/sound/soc/codecs/rt5682-sdw.c
@@ -410,7 +410,9 @@ static int rt5682_io_init(struct device *dev, struct sdw_slave *slave)
if (rt5682->first_hw_init) {
regcache_cache_bypass(rt5682->regmap, false);
regcache_mark_dirty(rt5682->regmap);
- regcache_sync(rt5682->regmap);
+ ret = regcache_sync(rt5682->regmap);
+ if (ret)
+ goto err_sync;
/* volatile registers */
regmap_update_bits(rt5682->regmap, RT5682_CBJ_CTRL_2,
@@ -472,8 +474,16 @@ static int rt5682_io_init(struct device *dev, struct sdw_slave *slave)
/* Mark Slave initialization complete */
rt5682->hw_init = true;
rt5682->first_hw_init = true;
+ goto out;
+
+err_sync:
+ regcache_cache_bypass(rt5682->regmap, false);
+ regcache_cache_only(rt5682->sdw_regmap, true);
+ regcache_cache_only(rt5682->regmap, true);
+ regcache_mark_dirty(rt5682->regmap);
err_nodev:
+out:
pm_runtime_put_autosuspend(&slave->dev);
dev_dbg(&slave->dev, "%s hw_init complete: %d\n", __func__, ret);
@@ -776,7 +786,13 @@ static int rt5682_dev_resume(struct device *dev)
regcache_cache_only(rt5682->sdw_regmap, false);
regcache_cache_only(rt5682->regmap, false);
- regcache_sync(rt5682->regmap);
+ ret = regcache_sync(rt5682->regmap);
+ if (ret) {
+ regcache_cache_only(rt5682->sdw_regmap, true);
+ regcache_cache_only(rt5682->regmap, true);
+ regcache_mark_dirty(rt5682->regmap);
+ return ret;
+ }
return 0;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 18/19] ASoC: codecs: max98396: Unwind supplies on resume failure
2026-07-04 3:48 [PATCH 00/19] ASoC: codecs: propagate regcache_sync() failures Pengpeng Hou
` (16 preceding siblings ...)
2026-07-04 4:05 ` [PATCH 17/19] ASoC: codecs: rt5682-sdw: " Pengpeng Hou
@ 2026-07-04 4:06 ` Pengpeng Hou
2026-07-04 4:07 ` [PATCH 19/19] ASoC: codecs: max98090: Propagate runtime regcache_sync() errors Pengpeng Hou
18 siblings, 0 replies; 24+ messages in thread
From: Pengpeng Hou @ 2026-07-04 4:06 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown
Cc: Srinivas Kandagatla, Jaroslav Kysela, Takashi Iwai, linux-sound,
linux-arm-msm, linux-kernel, Oder Chiou, Shenghao Ding, Kevin Lu,
Baojun Xu, David Rhodes, Richard Fitzgerald, patches,
Bartosz Golaszewski, Kuninori Morimoto, Charles Keepax,
Sebastian Krzyszkowiak, Shengjiu Wang, Sharique Mohammad,
Pengpeng Hou
max98396_resume() enables the core, pvdd, and vbat supplies before
leaving cache-only mode, resetting the device, and replaying cached
register state. The function currently ignores regcache_sync() failures,
and the optional pvdd/vbat enable failures return without unwinding
supplies that were already enabled in this resume attempt.
Rework the function to use common error labels. This propagates sync
failures, restores cache-only/dirty state on failed cache replay, and
disables each supply acquired by this resume path before returning the
error.
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
---
sound/soc/codecs/max98396.c | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/max98396.c b/sound/soc/codecs/max98396.c
index 9c1d7213410c..e5a2fe824c03 100644
--- a/sound/soc/codecs/max98396.c
+++ b/sound/soc/codecs/max98396.c
@@ -1600,19 +1600,37 @@ static int max98396_resume(struct device *dev)
if (max98396->pvdd) {
ret = regulator_enable(max98396->pvdd);
if (ret < 0)
- return ret;
+ goto err_core_supplies;
}
if (max98396->vbat) {
ret = regulator_enable(max98396->vbat);
if (ret < 0)
- return ret;
+ goto err_pvdd;
}
regcache_cache_only(max98396->regmap, false);
max98396_reset(max98396, dev);
- regcache_sync(max98396->regmap);
+ ret = regcache_sync(max98396->regmap);
+ if (ret < 0) {
+ regcache_cache_only(max98396->regmap, true);
+ regcache_mark_dirty(max98396->regmap);
+ goto err_vbat;
+ }
+
return 0;
+
+err_vbat:
+ if (max98396->vbat)
+ regulator_disable(max98396->vbat);
+err_pvdd:
+ if (max98396->pvdd)
+ regulator_disable(max98396->pvdd);
+err_core_supplies:
+ regulator_bulk_disable(MAX98396_NUM_CORE_SUPPLIES,
+ max98396->core_supplies);
+
+ return ret;
}
static const struct dev_pm_ops max98396_pm = {
--
2.43.0
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 19/19] ASoC: codecs: max98090: Propagate runtime regcache_sync() errors
2026-07-04 3:48 [PATCH 00/19] ASoC: codecs: propagate regcache_sync() failures Pengpeng Hou
` (17 preceding siblings ...)
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
18 siblings, 0 replies; 24+ messages in thread
From: Pengpeng Hou @ 2026-07-04 4:07 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown
Cc: Srinivas Kandagatla, Jaroslav Kysela, Takashi Iwai, linux-sound,
linux-arm-msm, linux-kernel, Oder Chiou, Shenghao Ding, Kevin Lu,
Baojun Xu, David Rhodes, Richard Fitzgerald, patches,
Bartosz Golaszewski, Kuninori Morimoto, Charles Keepax,
Sebastian Krzyszkowiak, Shengjiu Wang, Sharique Mohammad,
Pengpeng Hou
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
^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH 12/19] ASoC: codecs: wm2200: Propagate regcache_sync() errors
2026-07-04 4:00 ` [PATCH 12/19] ASoC: codecs: wm2200: " Pengpeng Hou
@ 2026-07-06 9:00 ` Richard Fitzgerald
0 siblings, 0 replies; 24+ messages in thread
From: Richard Fitzgerald @ 2026-07-06 9:00 UTC (permalink / raw)
To: Pengpeng Hou, Liam Girdwood, Mark Brown
Cc: Srinivas Kandagatla, Jaroslav Kysela, Takashi Iwai, linux-sound,
linux-arm-msm, linux-kernel, Oder Chiou, Shenghao Ding, Kevin Lu,
Baojun Xu, David Rhodes, patches, Bartosz Golaszewski,
Kuninori Morimoto, Charles Keepax, Sebastian Krzyszkowiak,
Shengjiu Wang, Sharique Mohammad
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>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 15/19] ASoC: codecs: cs4349: Propagate regcache_sync() errors
2026-07-04 4:03 ` [PATCH 15/19] ASoC: codecs: cs4349: " Pengpeng Hou
@ 2026-07-06 9:03 ` Richard Fitzgerald
0 siblings, 0 replies; 24+ messages in thread
From: Richard Fitzgerald @ 2026-07-06 9:03 UTC (permalink / raw)
To: Pengpeng Hou, Liam Girdwood, Mark Brown
Cc: Srinivas Kandagatla, Jaroslav Kysela, Takashi Iwai, linux-sound,
linux-arm-msm, linux-kernel, Oder Chiou, Shenghao Ding, Kevin Lu,
Baojun Xu, David Rhodes, patches, Bartosz Golaszewski,
Kuninori Morimoto, Charles Keepax, Sebastian Krzyszkowiak,
Shengjiu Wang, Sharique Mohammad
On 04/07/2026 5:03 am, Pengpeng Hou wrote:
> regcache_sync() can fail while replaying cached register state during
> runtime resume. cs4349_runtime_resume() currently ignores that failure
> and returns success.
>
> Propagate the error, restore cache-only/dirty state, and hold reset low
> again on sync failure.
>
> Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
> ---
> sound/soc/codecs/cs4349.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/sound/soc/codecs/cs4349.c b/sound/soc/codecs/cs4349.c
> index 6ac6d306b054..9a7f70175717 100644
> --- a/sound/soc/codecs/cs4349.c
> +++ b/sound/soc/codecs/cs4349.c
> @@ -340,7 +340,13 @@ static int cs4349_runtime_resume(struct device *dev)
> gpiod_set_value_cansleep(cs4349->reset_gpio, 1);
>
> regcache_cache_only(cs4349->regmap, false);
> - regcache_sync(cs4349->regmap);
> + ret = regcache_sync(cs4349->regmap);
> + if (ret) {
> + regcache_cache_only(cs4349->regmap, true);
> + regcache_mark_dirty(cs4349->regmap);
> + gpiod_set_value_cansleep(cs4349->reset_gpio, 0);
Should this also revert the regmap_update_bits() ?
> + return ret;
> + }
>
> return 0;
> }
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 14/19] ASoC: codecs: wm8962: Propagate regcache_sync() errors
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
0 siblings, 1 reply; 24+ messages in thread
From: Richard Fitzgerald @ 2026-07-06 9:11 UTC (permalink / raw)
To: Pengpeng Hou, Liam Girdwood, Mark Brown
Cc: Srinivas Kandagatla, Jaroslav Kysela, Takashi Iwai, linux-sound,
linux-arm-msm, linux-kernel, Oder Chiou, Shenghao Ding, Kevin Lu,
Baojun Xu, David Rhodes, patches, Bartosz Golaszewski,
Kuninori Morimoto, Charles Keepax, Sebastian Krzyszkowiak,
Shengjiu Wang, Sharique Mohammad
On 04/07/2026 5:02 am, Pengpeng Hou wrote:
> regcache_sync() can fail while replaying cached register state during
> runtime resume. wm8962_runtime_resume() currently ignores that failure
> and continues programming the device.
>
> Propagate the error, restore cache-only/dirty state, and unwind the
> supplies and clock acquired by runtime resume.
>
> Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
> ---
> sound/soc/codecs/wm8962.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
> index de18b1f85a32..2db822fc1de7 100644
> --- a/sound/soc/codecs/wm8962.c
> +++ b/sound/soc/codecs/wm8962.c
> @@ -3937,7 +3937,9 @@ static int wm8962_runtime_resume(struct device *dev)
> WM8962_OSC_ENA | WM8962_PLL2_ENA | WM8962_PLL3_ENA,
> 0);
>
What about the regmap writes that happen before this?
There is a regmap_write_bits() and two regmap_update_bits() that could
fail before we get to the regcache_sync() but they aren't checked for
error.
> - regcache_sync(wm8962->regmap);
> + ret = regcache_sync(wm8962->regmap);
> + if (ret)
> + goto cache_sync_err;
>
> regmap_update_bits(wm8962->regmap, WM8962_ANTI_POP,
> WM8962_STARTUP_BIAS_ENA | WM8962_VMID_BUF_ENA,
> @@ -3955,6 +3957,11 @@ static int wm8962_runtime_resume(struct device *dev)
>
> return 0;
>
> +cache_sync_err:
Should this error path revert the three regmap writes that were done
before the regcache_sync() ?
> + regcache_cache_only(wm8962->regmap, true);
> + regcache_mark_dirty(wm8962->regmap);
> + regulator_bulk_disable(ARRAY_SIZE(wm8962->supplies),
> + wm8962->supplies);
> disable_clock:
> clk_disable_unprepare(wm8962->pdata.mclk);
> return ret;
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 14/19] ASoC: codecs: wm8962: Propagate regcache_sync() errors
2026-07-06 9:11 ` Richard Fitzgerald
@ 2026-07-06 12:37 ` Mark Brown
0 siblings, 0 replies; 24+ messages in thread
From: Mark Brown @ 2026-07-06 12:37 UTC (permalink / raw)
To: Richard Fitzgerald
Cc: Pengpeng Hou, Liam Girdwood, Srinivas Kandagatla, Jaroslav Kysela,
Takashi Iwai, linux-sound, linux-arm-msm, linux-kernel,
Oder Chiou, Shenghao Ding, Kevin Lu, Baojun Xu, David Rhodes,
patches, Bartosz Golaszewski, Kuninori Morimoto, Charles Keepax,
Sebastian Krzyszkowiak, Shengjiu Wang, Sharique Mohammad
[-- Attachment #1: Type: text/plain, Size: 646 bytes --]
On Mon, Jul 06, 2026 at 10:11:35AM +0100, Richard Fitzgerald wrote:
> On 04/07/2026 5:02 am, Pengpeng Hou wrote:
> > @@ -3955,6 +3957,11 @@ static int wm8962_runtime_resume(struct device *dev)
> > return 0;
> > +cache_sync_err:
> Should this error path revert the three regmap writes that were done
> before the regcache_sync() ?
Possibly, OTOH if the sync is failing we probably have I/O issues and
it's questionable if the revert will work. We also don't know how much
of the sync actually happened so that's a thing too. I suggest not
worrying too much about it until we've got an actual use case where
sensible recovery is plausible.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2026-07-06 12:37 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 19/19] ASoC: codecs: max98090: Propagate runtime regcache_sync() errors Pengpeng Hou
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox