ASoC: SDCA: Power management fixes for the class function driver
Subsystems (3)
Maciej Strozek
maintainercover ASoC: SDCA: Power management fixes for the class function driver
The first corrects the point at which the suspended flag is set during system suspend, the second balances the runtime PM reference taken in probe when one of the later probe steps fails.
Maciej Strozek (2):
ASoC: SDCA: Set suspended flag after resuming within system suspend
ASoC: SDCA: Add better pm_runtime error handling in func probe
sound/soc/sdca/sdca_class_function.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-)
base-commit: 782424a17d77ae6de07b490618b523066c528f59
Signature · 1 line
2.47.3
Maciej Strozek
maintainerPATCH 1/2 ASoC: SDCA: Set suspended flag after resuming within system suspend
drv->suspended path was executed before system suspension instead of after, move it lower to correct it.
--- sound/soc/sdca/sdca_class_function.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/sdca/sdca_class_function.c +2 -2
@@ -491,8 +491,6 @@ static int class_function_suspend(struct device *dev)struct class_function_drv *drv =auxiliary_get_drvdata (auxdev);int ret; - drv->suspended = true; -/* Ensure runtime resume runs on resume */ ret =pm_runtime_resume_and_get (dev);if (ret) {
@@ -500,6 +498,8 @@ static int class_function_suspend(struct device *dev)return ret; } + drv->suspended = true; +sdca_irq_disable (drv->function, drv->core->irq_info); ret =pm_runtime_force_suspend (dev);
Signature · 1 line
2.47.3
Maciej Strozek
maintainerPATCH 2/2 ASoC: SDCA: Add better pm_runtime error handling in func probe
In reply to Maciej StrozekAdd a common error path in probe that balances the runtime PM reference.
--- sound/soc/sdca/sdca_class_function.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
sound/soc/sdca/sdca_class_function.c +11 -4
@@ -389,20 +389,27 @@ static int class_function_probe(struct auxiliary_device *auxdev, ret =devm_pm_runtime_enable (dev);if (ret) -return ret; + goto err_pm; ret =class_function_boot (drv);if (ret) -return ret; + goto err_pm; ret =devm_snd_soc_register_component (dev, cmp_drv, dais, num_dais); -if (ret) -return dev_err_probe (dev, ret,"failed to register component\n" ); +if (ret) { +dev_err_probe (dev, ret,"failed to register component\n" ); + goto err_pm; + }pm_runtime_mark_last_busy (dev);pm_runtime_put_autosuspend (dev);return 0 ; + +err_pm: +pm_runtime_put_sync (dev); + +return ret; }static void class_function_remove (struct auxiliary_device *auxdev)
Signature · 1 line
2.47.3
Quoted 8 lines · Maciej Strozek
The first corrects the point at which the suspended flag is set during system suspend, the second balances the runtime PM reference taken in probe when one of the later probe steps fails.
Maciej Strozek (2):
ASoC: SDCA: Set suspended flag after resuming within system suspend
ASoC: SDCA: Add betterpm_runtimeerror handling in func probe
Quoted 6 lines
sound/soc/sdca/sdca_class_function.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-)base-commit:
782424a17d77ae6de07b490618b523066c528f59
Thanks,
Charles
Mark Brown
maintainerQuoted 11 lines · Maciej Strozek
ASoC: SDCA: Power management fixes for the class function driver
The first corrects the point at which the suspended flag is set during system suspend, the second balances the runtime PM reference taken in probe when one of the later probe steps fails.
Maciej Strozek (2):
ASoC: SDCA: Set suspended flag after resuming within system suspend
ASoC: SDCA: Add betterpm_runtimeerror handling in func probe[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.3
Thanks!
[1/2] ASoC: SDCA: Set suspended flag after resuming within system suspend
https://git.kernel.org/broonie/sound/c/b16610e3770e [2/2] ASoC: SDCA: Add better pm_runtime error handling in func probe https://git.kernel.org/broonie/sound/c/91094f9c8621
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