Re: [PATCH] clk: disable unused clocks registered after boot

From: Brian Masney

Date: Thu Sep 17 2026 - 12:31:06 EST


Hi Alexandre,

On Thu, Sep 17, 2026 at 04:40:10PM +0200, alexandre.belloni@xxxxxxxxxxx wrote:
> From: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>
>
> clk_disable_unused() only runs once as a late_initcall, so clocks
> registered afterwards by loading a module are never checked and may be left
> running needlessly.
>
> So record when clk_disable_unused has run and afterwards, schedule a
> delayed work to run the scan when new clocks are registered.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>

We're actually in the process of redoing the way clk_disable_unused is
handled. I posted a series to add sync_state support to the clk
framework:

https://lore.kernel.org/linux-clk/20260626-clk-sync-state-v1-0-4156d8196dc8@xxxxxxxxxx/

Will you be at Linux Plumbers in Prague in 2.5 weeks? If so, come to
this talk where we will talk about the clk subsystem.

Evolving support for sync_state to subsystems beyond genpd
https://lpc.events/event/20/contributions/2504/

Brian