[PATCH v2 3/3] ASoC: sunxi: sun4i-spdif: Reorder clock enable sequence
Chen-Yu Tsai
wens at kernel.org
Fri May 22 12:20:40 PDT 2026
On Fri, May 22, 2026 at 12:54 PM <phucduc.bui at gmail.com> wrote:
>
> From: bui duc phuc <phucduc.bui at gmail.com>
>
> Enable the APB bus clock before the SPDIF module clock
> during runtime resume, as register accesses depend on the
> bus clock being enabled first.
That does not even matter here. Access will only happen once the runtime
PM callbacks return.
> Signed-off-by: bui duc phuc <phucduc.bui at gmail.com>
> ---
> sound/soc/sunxi/sun4i-spdif.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/sound/soc/sunxi/sun4i-spdif.c b/sound/soc/sunxi/sun4i-spdif.c
> index f54eb14c9ed8..102db1a2afbb 100644
> --- a/sound/soc/sunxi/sun4i-spdif.c
> +++ b/sound/soc/sunxi/sun4i-spdif.c
> @@ -643,15 +643,15 @@ static int sun4i_spdif_runtime_suspend(struct device *dev)
>
> static int sun4i_spdif_runtime_resume(struct device *dev)
> {
> - struct sun4i_spdif_dev *host = dev_get_drvdata(dev);
> + struct sun4i_spdif_dev *host = dev_get_drvdata(dev);
> int ret;
>
> - ret = clk_prepare_enable(host->spdif_clk);
> + ret = clk_prepare_enable(host->apb_clk);
> if (ret)
> return ret;
> - ret = clk_prepare_enable(host->apb_clk);
> + ret = clk_prepare_enable(host->spdif_clk);
> if (ret)
> - clk_disable_unprepare(host->spdif_clk);
> + clk_disable_unprepare(host->apb_clk);
>
> return ret;
> }
> --
> 2.43.0
>
More information about the linux-arm-kernel
mailing list