* [PATCH] ASoC: cs35l32: add missed regulator_bulk_disable in remove
@ 2019-12-06 7:51 ` Chuhong Yuan
0 siblings, 0 replies; 4+ messages in thread
From: Chuhong Yuan @ 2019-12-06 7:51 UTC (permalink / raw)
Cc: Brian Austin, Paul Handrigan, Liam Girdwood, Mark Brown,
Jaroslav Kysela, Takashi Iwai, alsa-devel, linux-kernel,
Chuhong Yuan
The driver forgets to call regulator_bulk_disable() in remove like that
in probe failure.
Add the missed call to fix it.
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
---
sound/soc/codecs/cs35l32.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/codecs/cs35l32.c b/sound/soc/codecs/cs35l32.c
index 3a644a35c464..be8159bd8ec8 100644
--- a/sound/soc/codecs/cs35l32.c
+++ b/sound/soc/codecs/cs35l32.c
@@ -501,6 +501,8 @@ static int cs35l32_i2c_remove(struct i2c_client *i2c_client)
/* Hold down reset */
gpiod_set_value_cansleep(cs35l32->reset_gpio, 0);
+ regulator_bulk_disable(ARRAY_SIZE(cs35l32->supplies),
+ cs35l32->supplies);
return 0;
}
--
2.24.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [alsa-devel] [PATCH] ASoC: cs35l32: add missed regulator_bulk_disable in remove
@ 2019-12-06 7:51 ` Chuhong Yuan
0 siblings, 0 replies; 4+ messages in thread
From: Chuhong Yuan @ 2019-12-06 7:51 UTC (permalink / raw)
Cc: Brian Austin, alsa-devel, linux-kernel, Chuhong Yuan,
Takashi Iwai, Paul Handrigan, Liam Girdwood, Mark Brown
The driver forgets to call regulator_bulk_disable() in remove like that
in probe failure.
Add the missed call to fix it.
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
---
sound/soc/codecs/cs35l32.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/codecs/cs35l32.c b/sound/soc/codecs/cs35l32.c
index 3a644a35c464..be8159bd8ec8 100644
--- a/sound/soc/codecs/cs35l32.c
+++ b/sound/soc/codecs/cs35l32.c
@@ -501,6 +501,8 @@ static int cs35l32_i2c_remove(struct i2c_client *i2c_client)
/* Hold down reset */
gpiod_set_value_cansleep(cs35l32->reset_gpio, 0);
+ regulator_bulk_disable(ARRAY_SIZE(cs35l32->supplies),
+ cs35l32->supplies);
return 0;
}
--
2.24.0
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ASoC: cs35l32: add missed regulator_bulk_disable in remove
2019-12-06 7:51 ` [alsa-devel] " Chuhong Yuan
@ 2019-12-09 16:22 ` Mark Brown
-1 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2019-12-09 16:22 UTC (permalink / raw)
To: Chuhong Yuan
Cc: Brian Austin, Paul Handrigan, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, alsa-devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 528 bytes --]
On Fri, Dec 06, 2019 at 03:51:46PM +0800, Chuhong Yuan wrote:
> @@ -501,6 +501,8 @@ static int cs35l32_i2c_remove(struct i2c_client *i2c_client)
> /* Hold down reset */
> gpiod_set_value_cansleep(cs35l32->reset_gpio, 0);
>
> + regulator_bulk_disable(ARRAY_SIZE(cs35l32->supplies),
> + cs35l32->supplies);
This is a similar situation to the one Charles pointed out - the driver
is using runtime PM to manage the regulators so unless the device is
active when removed the regulators won't be enabled.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [alsa-devel] [PATCH] ASoC: cs35l32: add missed regulator_bulk_disable in remove
@ 2019-12-09 16:22 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2019-12-09 16:22 UTC (permalink / raw)
To: Chuhong Yuan
Cc: alsa-devel, Liam Girdwood, linux-kernel, Brian Austin,
Paul Handrigan, Takashi Iwai
[-- Attachment #1.1: Type: text/plain, Size: 528 bytes --]
On Fri, Dec 06, 2019 at 03:51:46PM +0800, Chuhong Yuan wrote:
> @@ -501,6 +501,8 @@ static int cs35l32_i2c_remove(struct i2c_client *i2c_client)
> /* Hold down reset */
> gpiod_set_value_cansleep(cs35l32->reset_gpio, 0);
>
> + regulator_bulk_disable(ARRAY_SIZE(cs35l32->supplies),
> + cs35l32->supplies);
This is a similar situation to the one Charles pointed out - the driver
is using runtime PM to manage the regulators so unless the device is
active when removed the regulators won't be enabled.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 161 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-12-09 16:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-06 7:51 [PATCH] ASoC: cs35l32: add missed regulator_bulk_disable in remove Chuhong Yuan
2019-12-06 7:51 ` [alsa-devel] " Chuhong Yuan
2019-12-09 16:22 ` Mark Brown
2019-12-09 16:22 ` [alsa-devel] " Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.