clk: ti: add a usecount for autoidle
authorAndreas Kemnade <andreas@kemnade.info>
Wed, 16 Jan 2019 22:04:27 +0000 (23:04 +0100)
committerTero Kristo <t-kristo@ti.com>
Fri, 15 Feb 2019 14:47:55 +0000 (16:47 +0200)
commitd277ce2d3a75c6c116a6119c3745694f5941eff5
treecec5a936cac3b1f07daaf4cead9a3d1feae37a3a
parentead478250b950f1f082d4cb57bed3adeacfe53c3
clk: ti: add a usecount for autoidle

Multiple users might deny autoidle on a clock. So we should have some
counting here, also according to the comment in  _setup_iclk_autoidle().
Also setting autoidle regs is not atomic, so there is another reason
for locking.

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
Acked-by: Tony Lindgren <tony@atomide.com>
Tested-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
drivers/clk/ti/autoidle.c
include/linux/clk/ti.h