]> www.infradead.org Git - users/jedix/linux-maple.git/commit
clk: scmi: add is_prepared hook
authorPeng Fan <peng.fan@nxp.com>
Tue, 6 Aug 2024 14:56:01 +0000 (22:56 +0800)
committerStephen Boyd <sboyd@kernel.org>
Tue, 27 Aug 2024 19:11:45 +0000 (12:11 -0700)
commitfc953d40bd4318b45adc63db42c3cd5d2c5b0661
tree1207d211f6325701b33eff6258ae9d6290ba740a
parent8400291e289ee6b2bf9779ff1c83a291501f017b
clk: scmi: add is_prepared hook

Some clocks maybe default enabled by hardware. For clocks that don't
have users, that will be left in hardware default state, because prepare
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.

Reviewed-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20240806145601.1184337-1-peng.fan@oss.nxp.com
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk-scmi.c