[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250617074334.3229001-1-shengjiu.wang@nxp.com>
Date: Tue, 17 Jun 2025 15:43:34 +0800
From: Shengjiu Wang <shengjiu.wang@....com>
To: david.rhodes@...rus.com,
rf@...nsource.cirrus.com,
lgirdwood@...il.com,
broonie@...nel.org,
perex@...ex.cz,
tiwai@...e.com,
linux-sound@...r.kernel.org,
patches@...nsource.cirrus.com,
linux-kernel@...r.kernel.org,
shengjiu.wang@...il.com
Subject: [PATCH] ASoC: cs42xx8: Move reset operation to runtime resume
When codec is in idle state, the runtime suspend is executed, if codec
has been reset and user wants to use i2ctransfer command to get the
codec registers, i2c access will fail.
Move reset operation to the runtime resume stage to avoid such issues.
Signed-off-by: Shengjiu Wang <shengjiu.wang@....com>
---
sound/soc/codecs/cs42xx8.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/codecs/cs42xx8.c b/sound/soc/codecs/cs42xx8.c
index 6a925f3f7137..be215cd2a714 100644
--- a/sound/soc/codecs/cs42xx8.c
+++ b/sound/soc/codecs/cs42xx8.c
@@ -617,6 +617,7 @@ static int cs42xx8_runtime_resume(struct device *dev)
return ret;
}
+ gpiod_set_value_cansleep(cs42xx8->gpiod_reset, 1);
gpiod_set_value_cansleep(cs42xx8->gpiod_reset, 0);
ret = regulator_bulk_enable(ARRAY_SIZE(cs42xx8->supplies),
@@ -658,8 +659,6 @@ static int cs42xx8_runtime_suspend(struct device *dev)
regulator_bulk_disable(ARRAY_SIZE(cs42xx8->supplies),
cs42xx8->supplies);
- gpiod_set_value_cansleep(cs42xx8->gpiod_reset, 1);
-
clk_disable_unprepare(cs42xx8->clk);
return 0;
--
2.34.1
Powered by blists - more mailing lists