mirror of https://github.com/torvalds/linux.git
ASoC: Intel: catpt: Fix probing order of driver components
catpt_dai_pcm_new() is called during the bring up sequence of the machine board device which is a different device to the parent (DSP) device yet utilizes pm_runtime_xxx() against it in order to send IPCs. If the parent's pm_runtime is not configured before that happens, errors will occur. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20251126095523.3925364-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
86a5b621be
commit
16e1773628
|
|
@ -184,22 +184,25 @@ static int catpt_probe_components(struct catpt_dev *cdev)
|
||||||
goto err_boot_fw;
|
goto err_boot_fw;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = catpt_register_board(cdev);
|
|
||||||
if (ret) {
|
|
||||||
dev_err(cdev->dev, "register board failed: %d\n", ret);
|
|
||||||
goto err_reg_board;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* reflect actual ADSP state in pm_runtime */
|
/* reflect actual ADSP state in pm_runtime */
|
||||||
pm_runtime_set_active(cdev->dev);
|
pm_runtime_set_active(cdev->dev);
|
||||||
|
|
||||||
pm_runtime_set_autosuspend_delay(cdev->dev, 2000);
|
pm_runtime_set_autosuspend_delay(cdev->dev, 2000);
|
||||||
pm_runtime_use_autosuspend(cdev->dev);
|
pm_runtime_use_autosuspend(cdev->dev);
|
||||||
pm_runtime_mark_last_busy(cdev->dev);
|
pm_runtime_mark_last_busy(cdev->dev);
|
||||||
|
/* Enable PM before spawning child device. See catpt_dai_pcm_new(). */
|
||||||
pm_runtime_enable(cdev->dev);
|
pm_runtime_enable(cdev->dev);
|
||||||
|
|
||||||
|
ret = catpt_register_board(cdev);
|
||||||
|
if (ret) {
|
||||||
|
dev_err(cdev->dev, "register board failed: %d\n", ret);
|
||||||
|
goto err_reg_board;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_reg_board:
|
err_reg_board:
|
||||||
|
pm_runtime_disable(cdev->dev);
|
||||||
snd_soc_unregister_component(cdev->dev);
|
snd_soc_unregister_component(cdev->dev);
|
||||||
err_boot_fw:
|
err_boot_fw:
|
||||||
catpt_dmac_remove(cdev);
|
catpt_dmac_remove(cdev);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue