Messages in this thread | | | Date | Thu, 5 Jan 2023 16:03:35 +0200 | Subject | Re: [PATCH v3 1/2] clk: Add generic sync_state callback for disabling unused clocks | From | Dmitry Baryshkov <> |
| |
On 27/12/2022 22:45, Abel Vesa wrote: > There are unused clocks that need to remain untouched by clk_disable_unused, > and most likely could be disabled later on sync_state. So provide a generic > sync_state callback for the clock providers that register such clocks. > Then, use the same mechanism as clk_disable_unused from that generic > callback, but pass the device to make sure only the clocks belonging to > the current clock provider get disabled, if unused. Also, during the > default clk_disable_unused, if the driver that registered the clock has > the generic clk_sync_state_disable_unused callback set for sync_state, > skip disabling its clocks. > > Signed-off-by: Abel Vesa <abel.vesa@linaro.org> > --- > > Changes since v2: > * dropped the check for sync_state callback (clk_sync_state_disable_unused), > like Dmitry suggested > > drivers/clk/clk.c | 57 +++++++++++++++++++++++++++++------- > include/linux/clk-provider.h | 1 + > 2 files changed, 47 insertions(+), 11 deletions(-)
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
-- With best wishes Dmitry
| |