alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 -next 0/4] Fix PM disable depth imbalance in probe
@ 2022-09-29 15:06 Zhang Qilong
  2022-09-29 15:06 ` [PATCH v2 -next 1/4] ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe Zhang Qilong
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Zhang Qilong @ 2022-09-29 15:06 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, matthias.bgg, ckeepax, jeff_chang
  Cc: patches, alsa-devel, linux-mediatek

The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context. We fix it by calling
pm_runtime_disable when error returns.
---
v2:
- call pm_runtime_disable when error returns.

Zhang Qilong (4):
  ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe
  ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe
  ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe
  ASoC: mt6660: Fix PM disable depth imbalance in mt6660_i2c_probe

 sound/soc/codecs/mt6660.c | 3 +++
 sound/soc/codecs/wm5102.c | 1 +
 sound/soc/codecs/wm5110.c | 1 +
 sound/soc/codecs/wm8997.c | 1 +
 4 files changed, 6 insertions(+)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v2 -next 1/4] ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe
  2022-09-29 15:06 [PATCH v2 -next 0/4] Fix PM disable depth imbalance in probe Zhang Qilong
@ 2022-09-29 15:06 ` Zhang Qilong
  2022-10-03 10:05   ` Charles Keepax
  2022-09-29 15:06 ` [PATCH v2 -next 2/4] ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe Zhang Qilong
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Zhang Qilong @ 2022-09-29 15:06 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, matthias.bgg, ckeepax, jeff_chang
  Cc: patches, alsa-devel, linux-mediatek

The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context. We fix it by calling
pm_runtime_disable when error returns.

Fixes:40843aea5a9bd ("ASoC: wm8997: Initial CODEC driver")
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
---
v2:
- call pm_runtime_disable when error returns
---
 sound/soc/codecs/wm8997.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/wm8997.c b/sound/soc/codecs/wm8997.c
index 210ad662fc26..c0207e9a7d53 100644
--- a/sound/soc/codecs/wm8997.c
+++ b/sound/soc/codecs/wm8997.c
@@ -1187,6 +1187,7 @@ static int wm8997_probe(struct platform_device *pdev)
 err_spk_irqs:
 	arizona_free_spk_irqs(arizona);
 err_jack_codec_dev:
+	pm_runtime_disable(&pdev->dev);
 	arizona_jack_codec_dev_remove(&wm8997->core);
 
 	return ret;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 -next 2/4] ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe
  2022-09-29 15:06 [PATCH v2 -next 0/4] Fix PM disable depth imbalance in probe Zhang Qilong
  2022-09-29 15:06 ` [PATCH v2 -next 1/4] ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe Zhang Qilong
@ 2022-09-29 15:06 ` Zhang Qilong
  2022-10-03 10:05   ` Charles Keepax
  2022-09-29 15:06 ` [PATCH v2 -next 3/4] ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe Zhang Qilong
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Zhang Qilong @ 2022-09-29 15:06 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, matthias.bgg, ckeepax, jeff_chang
  Cc: patches, alsa-devel, linux-mediatek

The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context. We fix it by calling
pm_runtime_enable when error returns.

Fixes:5c6af635fd772 ("ASoC: wm5110: Add audio CODEC driver")
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
---
v2:
- call pm_runtime_disable when error returns.
---
 sound/soc/codecs/wm5110.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c
index f3f4a10bf0f7..e0b971620d0f 100644
--- a/sound/soc/codecs/wm5110.c
+++ b/sound/soc/codecs/wm5110.c
@@ -2500,6 +2500,7 @@ static int wm5110_probe(struct platform_device *pdev)
 	arizona_set_irq_wake(arizona, ARIZONA_IRQ_DSP_IRQ1, 0);
 	arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, wm5110);
 err_jack_codec_dev:
+	pm_runtime_disable(&pdev->dev);
 	arizona_jack_codec_dev_remove(&wm5110->core);
 
 	return ret;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 -next 3/4] ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe
  2022-09-29 15:06 [PATCH v2 -next 0/4] Fix PM disable depth imbalance in probe Zhang Qilong
  2022-09-29 15:06 ` [PATCH v2 -next 1/4] ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe Zhang Qilong
  2022-09-29 15:06 ` [PATCH v2 -next 2/4] ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe Zhang Qilong
@ 2022-09-29 15:06 ` Zhang Qilong
  2022-10-03 10:05   ` Charles Keepax
  2022-09-29 15:06 ` [PATCH v2 -next 4/4] ASoC: mt6660: Fix PM disable depth imbalance in mt6660_i2c_probe Zhang Qilong
  2022-10-03 16:47 ` [PATCH v2 -next 0/4] Fix PM disable depth imbalance in probe Mark Brown
  4 siblings, 1 reply; 11+ messages in thread
From: Zhang Qilong @ 2022-09-29 15:06 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, matthias.bgg, ckeepax, jeff_chang
  Cc: patches, alsa-devel, linux-mediatek

The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context. We fix it by calling
pm_runtime_disable when error returns.

Fixes:93e8791dd34ca ("ASoC: wm5102: Initial driver")
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
---
v2:
- call pm_runtime_disable when error returns
---
 sound/soc/codecs/wm5102.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c
index af7d324e3352..adaf886b0a9d 100644
--- a/sound/soc/codecs/wm5102.c
+++ b/sound/soc/codecs/wm5102.c
@@ -2142,6 +2142,7 @@ static int wm5102_probe(struct platform_device *pdev)
 	arizona_set_irq_wake(arizona, ARIZONA_IRQ_DSP_IRQ1, 0);
 	arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, wm5102);
 err_jack_codec_dev:
+	pm_runtime_disable(&pdev->dev);
 	arizona_jack_codec_dev_remove(&wm5102->core);
 
 	return ret;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 -next 4/4] ASoC: mt6660: Fix PM disable depth imbalance in mt6660_i2c_probe
  2022-09-29 15:06 [PATCH v2 -next 0/4] Fix PM disable depth imbalance in probe Zhang Qilong
                   ` (2 preceding siblings ...)
  2022-09-29 15:06 ` [PATCH v2 -next 3/4] ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe Zhang Qilong
@ 2022-09-29 15:06 ` Zhang Qilong
  2022-09-30  8:39   ` AngeloGioacchino Del Regno
  2022-10-03 17:37   ` [PATCH v2 " Mark Brown
  2022-10-03 16:47 ` [PATCH v2 -next 0/4] Fix PM disable depth imbalance in probe Mark Brown
  4 siblings, 2 replies; 11+ messages in thread
From: Zhang Qilong @ 2022-09-29 15:06 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, matthias.bgg, ckeepax, jeff_chang
  Cc: patches, alsa-devel, linux-mediatek

The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context. We fix it by calling
pm_runtime_disable when error returns.

Fixes:f289e55c6eeb4 ("ASoC: Add MediaTek MT6660 Speaker Amp Driver")
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
---
v2:
- call pm_runtime_disable when error returns
---
 sound/soc/codecs/mt6660.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sound/soc/codecs/mt6660.c b/sound/soc/codecs/mt6660.c
index 4971cd0b90f8..36220a1f80a6 100644
--- a/sound/soc/codecs/mt6660.c
+++ b/sound/soc/codecs/mt6660.c
@@ -509,6 +509,9 @@ static int mt6660_i2c_probe(struct i2c_client *client)
 	ret = devm_snd_soc_register_component(chip->dev,
 					       &mt6660_component_driver,
 					       &mt6660_codec_dai, 1);
+	if (ret)
+		pm_runtime_disable(chip->dev);
+
 	return ret;
 probe_fail:
 	_mt6660_chip_power_on(chip, 0);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 -next 4/4] ASoC: mt6660: Fix PM disable depth imbalance in mt6660_i2c_probe
  2022-09-29 15:06 ` [PATCH v2 -next 4/4] ASoC: mt6660: Fix PM disable depth imbalance in mt6660_i2c_probe Zhang Qilong
@ 2022-09-30  8:39   ` AngeloGioacchino Del Regno
  2022-10-03 17:37   ` [PATCH v2 " Mark Brown
  1 sibling, 0 replies; 11+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-09-30  8:39 UTC (permalink / raw)
  To: Zhang Qilong, lgirdwood, broonie, perex, tiwai, matthias.bgg,
	ckeepax, jeff_chang
  Cc: patches, alsa-devel, linux-mediatek

Il 29/09/22 17:06, Zhang Qilong ha scritto:
> The pm_runtime_enable will increase power disable depth. Thus
> a pairing decrement is needed on the error handling path to
> keep it balanced according to context. We fix it by calling
> pm_runtime_disable when error returns.
> 
> Fixes:f289e55c6eeb4 ("ASoC: Add MediaTek MT6660 Speaker Amp Driver")
> Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 -next 1/4] ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe
  2022-09-29 15:06 ` [PATCH v2 -next 1/4] ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe Zhang Qilong
@ 2022-10-03 10:05   ` Charles Keepax
  0 siblings, 0 replies; 11+ messages in thread
From: Charles Keepax @ 2022-10-03 10:05 UTC (permalink / raw)
  To: Zhang Qilong
  Cc: alsa-devel, patches, tiwai, lgirdwood, jeff_chang, broonie,
	linux-mediatek, matthias.bgg, ckeepax

On Thu, Sep 29, 2022 at 11:06:50PM +0800, Zhang Qilong wrote:
> The pm_runtime_enable will increase power disable depth. Thus
> a pairing decrement is needed on the error handling path to
> keep it balanced according to context. We fix it by calling
> pm_runtime_disable when error returns.
> 
> Fixes:40843aea5a9bd ("ASoC: wm8997: Initial CODEC driver")
> Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
> ---
> v2:
> - call pm_runtime_disable when error returns
> ---

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 -next 2/4] ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe
  2022-09-29 15:06 ` [PATCH v2 -next 2/4] ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe Zhang Qilong
@ 2022-10-03 10:05   ` Charles Keepax
  0 siblings, 0 replies; 11+ messages in thread
From: Charles Keepax @ 2022-10-03 10:05 UTC (permalink / raw)
  To: Zhang Qilong
  Cc: alsa-devel, patches, tiwai, lgirdwood, jeff_chang, broonie,
	linux-mediatek, matthias.bgg, ckeepax

On Thu, Sep 29, 2022 at 11:06:51PM +0800, Zhang Qilong wrote:
> The pm_runtime_enable will increase power disable depth. Thus
> a pairing decrement is needed on the error handling path to
> keep it balanced according to context. We fix it by calling
> pm_runtime_enable when error returns.
> 
> Fixes:5c6af635fd772 ("ASoC: wm5110: Add audio CODEC driver")
> Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
> ---
> v2:
> - call pm_runtime_disable when error returns.
> ---

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 -next 3/4] ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe
  2022-09-29 15:06 ` [PATCH v2 -next 3/4] ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe Zhang Qilong
@ 2022-10-03 10:05   ` Charles Keepax
  0 siblings, 0 replies; 11+ messages in thread
From: Charles Keepax @ 2022-10-03 10:05 UTC (permalink / raw)
  To: Zhang Qilong
  Cc: alsa-devel, patches, tiwai, lgirdwood, jeff_chang, broonie,
	linux-mediatek, matthias.bgg, ckeepax

On Thu, Sep 29, 2022 at 11:06:52PM +0800, Zhang Qilong wrote:
> The pm_runtime_enable will increase power disable depth. Thus
> a pairing decrement is needed on the error handling path to
> keep it balanced according to context. We fix it by calling
> pm_runtime_disable when error returns.
> 
> Fixes:93e8791dd34ca ("ASoC: wm5102: Initial driver")
> Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
> ---
> v2:
> - call pm_runtime_disable when error returns
> ---

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 -next 0/4] Fix PM disable depth imbalance in probe
  2022-09-29 15:06 [PATCH v2 -next 0/4] Fix PM disable depth imbalance in probe Zhang Qilong
                   ` (3 preceding siblings ...)
  2022-09-29 15:06 ` [PATCH v2 -next 4/4] ASoC: mt6660: Fix PM disable depth imbalance in mt6660_i2c_probe Zhang Qilong
@ 2022-10-03 16:47 ` Mark Brown
  4 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2022-10-03 16:47 UTC (permalink / raw)
  To: lgirdwood, Zhang Qilong, perex, ckeepax, matthias.bgg, tiwai, jeff_chang
  Cc: patches, alsa-devel, linux-mediatek

On Thu, 29 Sep 2022 23:06:49 +0800, Zhang Qilong wrote:
> The pm_runtime_enable will increase power disable depth. Thus
> a pairing decrement is needed on the error handling path to
> keep it balanced according to context. We fix it by calling
> pm_runtime_disable when error returns.
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/4] ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe
      commit: 41a736ac20602f64773e80f0f5b32cde1830a44a
[2/4] ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe
      commit: 86b46bf1feb83898d89a2b4a8d08d21e9ea277a7
[3/4] ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe
      commit: fcbb60820cd3008bb44334a0395e5e57ccb77329
[4/4] ASoC: mt6660: Fix PM disable depth imbalance in mt6660_i2c_probe
      commit: b73f11e895e140537e7f8c7251211ccd3ce0782b

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 4/4] ASoC: mt6660: Fix PM disable depth imbalance in mt6660_i2c_probe
  2022-09-29 15:06 ` [PATCH v2 -next 4/4] ASoC: mt6660: Fix PM disable depth imbalance in mt6660_i2c_probe Zhang Qilong
  2022-09-30  8:39   ` AngeloGioacchino Del Regno
@ 2022-10-03 17:37   ` Mark Brown
  1 sibling, 0 replies; 11+ messages in thread
From: Mark Brown @ 2022-10-03 17:37 UTC (permalink / raw)
  To: Zhang Qilong
  Cc: alsa-devel, patches, tiwai, lgirdwood, jeff_chang,
	linux-mediatek, matthias.bgg, ckeepax

[-- Attachment #1: Type: text/plain, Size: 358 bytes --]

On Thu, Sep 29, 2022 at 11:06:53PM +0800, Zhang Qilong wrote:
> The pm_runtime_enable will increase power disable depth. Thus
> a pairing decrement is needed on the error handling path to
> keep it balanced according to context. We fix it by calling
> pm_runtime_disable when error returns.

This doesn't apply against current code, please check and resend.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-10-03 17:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-29 15:06 [PATCH v2 -next 0/4] Fix PM disable depth imbalance in probe Zhang Qilong
2022-09-29 15:06 ` [PATCH v2 -next 1/4] ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe Zhang Qilong
2022-10-03 10:05   ` Charles Keepax
2022-09-29 15:06 ` [PATCH v2 -next 2/4] ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe Zhang Qilong
2022-10-03 10:05   ` Charles Keepax
2022-09-29 15:06 ` [PATCH v2 -next 3/4] ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe Zhang Qilong
2022-10-03 10:05   ` Charles Keepax
2022-09-29 15:06 ` [PATCH v2 -next 4/4] ASoC: mt6660: Fix PM disable depth imbalance in mt6660_i2c_probe Zhang Qilong
2022-09-30  8:39   ` AngeloGioacchino Del Regno
2022-10-03 17:37   ` [PATCH v2 " Mark Brown
2022-10-03 16:47 ` [PATCH v2 -next 0/4] Fix PM disable depth imbalance in probe Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).