Re: [PATCH] rtc: pcf85063: disable the clkout output by default

From: Sverdlin, Alexander

Date: Wed Aug 26 2026 - 02:17:31 EST


Hi Alexandre,

On Tue, 2026-08-25 at 23:07 +0200, Alexandre Belloni wrote:
> > > > The PCF85063 powers up with its CLKOUT pin driving the 32.768 kHz. While
> > > > it's possible to request a specific default frequency in the DT via
> > > > assigned-clocks/assigned-clock-rates on the RTC node itself, even without
> > > > a real consumer referencing the clock, there is no such possibility to
> > > > disable the clock output by default.
> > >
> > > Are you sure about this? The CCF should disable the clock if it is not
> > > used.
> >
> > There is late_initcall_sync(clk_disable_unused) (marked __init), but for the
> > clock providers registered later, say, via modules, there is no such mechanism.
> > And I double-checked this putting some debug prints into the driver,
> > nothing from struct clk_ops is being called without a consumer in DT.
> >
>
> Right, so what about the patch attached which seems to work fine with my
> rv3032.

The patch would work for me as well, will you publish it officially?

BTW, it's racy, if __clk_register() would be called between

clk_disable_unused();

... and...

WRITE_ONCE(clk_disable_unused_done, true);

... the workqueue will not be scheduled. But overall it's a nice idea!

Maybe we just need to drop late_initcall_sync() entirely, this would simplify
the things a bit?

--
Alexander Sverdlin
Siemens AG
www.siemens.com