Re: [PATCH] ARM: mxs: enforce semantics ofclk_prepare()/clk_unprepare() and clk_enable()/clk_disable()

From: Shawn Guo
Date: Thu Mar 22 2012 - 04:35:13 EST


On Thu, Mar 22, 2012 at 09:18:17AM +0100, Lothar Waßmann wrote:
> After introducing clk_prepare()/clk_unprepare() there may still be
> drivers out there that don't use the new functions.
> This patch warns about drivers calling clk_enable() without a
> preceding clk_prepare() and various other invalid sequences of calls
> to clk_enable()/clk_disable() and clk_prepare()/clk_unprepare().
>

I plan to migrate the mxs clock driver to common clk framework in the
next merge window. Thus, I do not see much point to take this patch.

> To not make a system unusable due to excessive warning messages the
> warnings are limited to 1 per clk by a flag in the 'flags' member of
> struct clk.
>
>
> Signed-off-by: Lothar Waßmann <LW@xxxxxxxxxxxxxxxxxxx>
> ---
> arch/arm/mach-mxs/clock.c | 98 ++++++++++++++++++++++++++++----
> arch/arm/mach-mxs/include/mach/clock.h | 6 ++
> 2 files changed, 93 insertions(+), 11 deletions(-)

--
Regards,
Shawn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/