Thread (8 messages) 8 messages, 5 authors, 2024-08-02

Re: [PATCH V2] clk: scmi: add is_prepared hook

From: Dhruva Gole <hidden>
Date: 2024-08-02 06:15:43
Also in: arm-scmi, linux-clk, lkml

Hi Peng,

On Aug 01, 2024 at 03:35:37 +0000, Peng Fan wrote:
Hi Sudeep, Dhruva,
quoted
Subject: Re: [PATCH V2] clk: scmi: add is_prepared hook

On Fri, Jul 26, 2024 at 07:22:31PM +0530, Dhruva Gole wrote:
quoted
On Jul 26, 2024 at 21:10:07 +0800, Peng Fan (OSS) wrote:
quoted
From: Peng Fan <peng.fan@nxp.com>

Some clks maybe default enabled by hardware, so add is_prepared
hook
quoted
quoted
for non-atomic clk_ops to get the status of the clk. Then when
disabling unused clks, those unused clks but default hardware on
clks could be in off state to save power.
Just a nit - reword the commit message as:
Then when disabling the unused clocks, they can be simply turned
OFF
quoted
to save power.
Ah this was what it meant. I couldn't parse the original text and was
about to ask.
quoted
Also if you can make it still verbose, explain when you expect this
disabling of unused clks to take place exactly? During boot?  Driver
probe sequence?
quoted
or By some user commands?
Agreed. Being little more verbose here would be beneficial IMO.
I will use below in V3:
"
Some clocks maybe default enabled by hardwar. For clocks that not 
s/not/don't
have users, they will be left in hardware default state, because prepare
s/they/that, will be left in default hardware state.
count and enable count is zero,if there is no is_prepared hook to get
the hardware state. So add is_prepared hook to detect the hardware
state. Then when disabling the unused clocks, they can be simply
turned OFF to save power during kernel boot.
"
Thanks, rest looks better.

-- 
Best regards,
Dhruva Gole [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help