RE: [PATCH v3 2/3] clk: Add clk_poll_disable_unprepare()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Russell King,

Thanks for the feedback.

> -----Original Message-----
> From: Russell King <linux@xxxxxxxxxxxxxxx>
> Sent: Friday, April 12, 2024 4:41 PM
> Subject: Re: [PATCH v3 2/3] clk: Add clk_poll_disable_unprepare()
> 
> On Mon, Mar 18, 2024 at 11:08:41AM +0000, Biju Das wrote:
> > The clk_disable_unprepare() doesn't guarantee that a clock is gated
> > after the execution as it is driver dependent. The Renesas and most of
> > the other platforms don't wait until clock is stopped because of performance reason.
> 
> I'm not sure it's "because of performance reason". It's probably more that it's not important for
> functionality.

Yes, It is not important for functionality. I mean "performance reason" because
the system can enter into suspend state very quickly and thereby saving the power 
of the whole system during suspend process(as we don't need to poll for turning
off each clock during suspend as it is not important).

> 
> > But these platforms wait while turning on the clock.
> >
> > The normal case for shutting down the clock is unbind/close/suspend or
> > error paths in the driver. Not waiting for the shutting down the clock
> > will improve the suspend time.
> >
> > But on RZ/G2L Camera Data Receiving Unit (CRU) IP, initially the vclk
> > is on. Before enabling link reception, we need to wait for vclk to be
> > off and after enabling reception, we need to turn the vlck on. Special
> > cases
> 
> "vclk" not "vlck".

Will fix this in next version.

> 
> > like this requires a sync API for clock gating.
> 
> I suppose this is fine for clocks that only have a single user, but this is highly undefined for
> clocks that could be shared between several different users, since it becomes racy whether another
> user of the clock has enabled or disabled this clock.

Agreed.
> 
> I think this new API needs to spell it that it is not for clocks that are shared.

Will document the new API for exclusive use.

Cheers,
Biju





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux