From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: "Sverdlin, Alexander" <alexander.sverdlin@siemens.com>
Cc: "linux-rtc@vger.kernel.org" <linux-rtc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] rtc: pcf85063: disable the clkout output by default
Date: Wed, 26 Aug 2026 08:45:56 +0200 [thread overview]
Message-ID: <20260826064556dda469fe@mail.local> (raw)
In-Reply-To: <f4ae12f3fba06fc00c74f76555d684c1fa706179.camel@siemens.com>
On 26/08/2026 06:13:08+0000, Sverdlin, Alexander wrote:
> 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?
>
Yes, that's the plan.
> 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!
I'm not sure you can actually load modules before late_initcall_sync
finishes.
>
> Maybe we just need to drop late_initcall_sync() entirely, this would simplify
> the things a bit?
I'll let this to the (new) clk maintainers.
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2026-08-26 6:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-24 8:07 A. Sverdlin
2026-08-24 8:24 ` Alexandre Belloni
2026-08-24 9:58 ` Sverdlin, Alexander
2026-08-25 21:07 ` Alexandre Belloni
2026-08-26 6:13 ` Sverdlin, Alexander
2026-08-26 6:45 ` Alexandre Belloni [this message]
2026-08-25 21:48 ` kernel test robot
2026-08-25 22:10 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260826064556dda469fe@mail.local \
--to=alexandre.belloni@bootlin.com \
--cc=alexander.sverdlin@siemens.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®