Subject: [PATCH] clk: invoke clk_disable_unused() after resume

From: [email-masked] (Stephen Boyd)
Date: Thu, 18 Dec 2014 14:48:33 -0800

On 12/18/2014 02:18 PM, Jim Quinlan wrote:
> In a discussion[1], mturquette made the suggestion that
>
>     "It might be a good idea to call clk_disable_unused()
>      from the clk core after resuming from suspend."
>
> This commit does exactly that.  For Broadcom STB chips, clocks
> may come up after resume in an "on" state, so calling
> clk_disable_unused() again will turn off clocks that should
> be off.
>
> [1] https://lkml.org/lkml/2014/11/17/666
>
> Signed-off-by: Jim Quinlan <[email-masked]>
>

It would be better to use the driver core or syscore suspend/resume
hooks to restore the state of the clocks as they were when the system
was suspended. Plus it would make more sense to do this on a
case-by-case basis instead of assuming that all platforms have clocks
that are left on out of resume. It could still be generic by exporting
the clk_disable_unused() function to drivers so they can call it if they
need to but I don't see why we want to force this on every platform for
every suspend/resume cycle.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project