Re: [PATCH v42 5/6] clk: clk_put WARNs if user has not disabled clk
From: Stephen Boyd
Date: Fri Feb 12 2016 - 20:19:04 EST
On 02/11, Michael Turquette wrote:
> >From the clk_put kerneldoc in include/linux/clk.h:
>
> """
> Note: drivers must ensure that all clk_enable calls made on this clock
> source are balanced by clk_disable calls prior to calling this function.
> """
>
> The common clock framework implementation of the clk.h api has per-user
> reference counts for calls to clk_prepare and clk_disable. As such it
> can enforce the requirement to properly call clk_disable and
> clk_unprepare before calling clk_put.
>
> Because this requirement is probably violated in many places, this patch
> starts with a simple warning. Once offending code has been fixed this
> check could additionally release the reference counts automatically.
Do we have any fixes for pm code in the works? I'm worried we're
going to be giving a warning and nobody will fix them or has a
plan to fix them.
>
> Signed-off-by: Michael Turquette <mturquette@xxxxxxxxxxxx>
> ---
Reviewed-by: Stephen Boyd <sboyd@xxxxxxxxxxxxxx>
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project