ASoC: codecs: lpass: register mclk after runtime pm
[ Upstream commit 1dc3459009c33e335f0d62b84dd39a6bbd7fd5d2 ] move mclk out registration after runtime pm is enabled so that the clk framework can resume the codec if it requires to enable the mclk out. Fixes: c96baa2949b2 ("ASoC: codecs: wsa-macro: add runtime pm support") Fixes: 72ad25eabda0 ("ASoC: codecs: va-macro: add runtime pm support") Fixes: 366ff79ed539 ("ASoC: codecs: rx-macro: add runtime pm support") Fixes: 1fb83bc5cf64 ("ASoC: codecs: tx-macro: add runtime pm support") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230209122806.18923-6-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
adcc7c98ce
commit
7b64227343
@ -3601,10 +3601,6 @@ static int rx_macro_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
goto err_fsgen;
|
||||
|
||||
ret = rx_macro_register_mclk_output(rx);
|
||||
if (ret)
|
||||
goto err_clkout;
|
||||
|
||||
ret = devm_snd_soc_register_component(dev, &rx_macro_component_drv,
|
||||
rx_macro_dai,
|
||||
ARRAY_SIZE(rx_macro_dai));
|
||||
@ -3618,6 +3614,10 @@ static int rx_macro_probe(struct platform_device *pdev)
|
||||
pm_runtime_set_active(dev);
|
||||
pm_runtime_enable(dev);
|
||||
|
||||
ret = rx_macro_register_mclk_output(rx);
|
||||
if (ret)
|
||||
goto err_clkout;
|
||||
|
||||
return 0;
|
||||
|
||||
err_clkout:
|
||||
|
@ -1889,10 +1889,6 @@ static int tx_macro_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
goto err_fsgen;
|
||||
|
||||
ret = tx_macro_register_mclk_output(tx);
|
||||
if (ret)
|
||||
goto err_clkout;
|
||||
|
||||
ret = devm_snd_soc_register_component(dev, &tx_macro_component_drv,
|
||||
tx_macro_dai,
|
||||
ARRAY_SIZE(tx_macro_dai));
|
||||
@ -1905,6 +1901,10 @@ static int tx_macro_probe(struct platform_device *pdev)
|
||||
pm_runtime_set_active(dev);
|
||||
pm_runtime_enable(dev);
|
||||
|
||||
ret = tx_macro_register_mclk_output(tx);
|
||||
if (ret)
|
||||
goto err_clkout;
|
||||
|
||||
return 0;
|
||||
|
||||
err_clkout:
|
||||
|
@ -1524,16 +1524,6 @@ static int va_macro_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
goto err_mclk;
|
||||
|
||||
ret = va_macro_register_fsgen_output(va);
|
||||
if (ret)
|
||||
goto err_clkout;
|
||||
|
||||
va->fsgen = clk_hw_get_clk(&va->hw, "fsgen");
|
||||
if (IS_ERR(va->fsgen)) {
|
||||
ret = PTR_ERR(va->fsgen);
|
||||
goto err_clkout;
|
||||
}
|
||||
|
||||
if (va->has_swr_master) {
|
||||
/* Set default CLK div to 1 */
|
||||
regmap_update_bits(va->regmap, CDC_VA_TOP_CSR_SWR_MIC_CTL0,
|
||||
@ -1560,6 +1550,16 @@ static int va_macro_probe(struct platform_device *pdev)
|
||||
pm_runtime_set_active(dev);
|
||||
pm_runtime_enable(dev);
|
||||
|
||||
ret = va_macro_register_fsgen_output(va);
|
||||
if (ret)
|
||||
goto err_clkout;
|
||||
|
||||
va->fsgen = clk_hw_get_clk(&va->hw, "fsgen");
|
||||
if (IS_ERR(va->fsgen)) {
|
||||
ret = PTR_ERR(va->fsgen);
|
||||
goto err_clkout;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_clkout:
|
||||
|
@ -2449,11 +2449,6 @@ static int wsa_macro_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
goto err_fsgen;
|
||||
|
||||
ret = wsa_macro_register_mclk_output(wsa);
|
||||
if (ret)
|
||||
goto err_clkout;
|
||||
|
||||
|
||||
ret = devm_snd_soc_register_component(dev, &wsa_macro_component_drv,
|
||||
wsa_macro_dai,
|
||||
ARRAY_SIZE(wsa_macro_dai));
|
||||
@ -2466,6 +2461,10 @@ static int wsa_macro_probe(struct platform_device *pdev)
|
||||
pm_runtime_set_active(dev);
|
||||
pm_runtime_enable(dev);
|
||||
|
||||
ret = wsa_macro_register_mclk_output(wsa);
|
||||
if (ret)
|
||||
goto err_clkout;
|
||||
|
||||
return 0;
|
||||
|
||||
err_clkout:
|
||||
|
Loading…
x
Reference in New Issue
Block a user