[PATCH] ASoC: sun4i-spdif: Use guard() for spin locks
Bui Duc Phuc
phucduc.bui at gmail.com
Sat May 16 16:50:13 PDT 2026
Hi all
I would like to make a small correction to my previous email, and
also confirm one additional point before preparing another patch.
Correction:
> However, I also looked at a similar case in the
> micfil_rate_set() function from the fsl_micfil driver:
> https://elixir.bootlin.com/linux/v7.1-rc3/source/sound/soc/fsl/fsl_micfil.c
In my previous email, I referred to the function as
micfil_rate_set(), but the correct name is
micfil_range_set().
Additional point for confirmation:
Currently, in sun4i_spdif_runtime_suspend(), the clocks are
disabled in the following order:
clk_disable_unprepare(host->spdif_clk);
clk_disable_unprepare(host->apb_clk);
Meanwhile, in sun4i_spdif_runtime_resume(), the clocks are
enabled in this order:
clk_prepare_enable(host->spdif_clk);
ret = clk_prepare_enable(host->apb_clk);
I checked the binding documentation here:
https://elixir.bootlin.com/linux/v7.1-rc3/source/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-spdif.yaml
It describes the clocks as:
properties:
clocks:
items:
- description: Bus Clock
- description: Module Clock
clock-names:
items:
- const: apb
- const: spdif
>From my understanding, apb_clk is the bus clock, while
spdif_clk is the module clock.
If that understanding is correct, then the suspend path seems
reasonable since the module clock is disabled before the bus
clock.
However, in the resume path, the module clock is currently
enabled before the bus clock. It may make more sense to enable
the bus clock first, followed by the module clock.
If my understanding is correct, I would like to prepare an
additional patch to reorder the clock enable sequence.
Please let me know if this interpretation makes sense.
Best Regard,
Phuc
More information about the linux-arm-kernel
mailing list