UPSTREAM: clk: add flag for clocks that need to be enabled on rate changes
authorHeiko Stuebner <heiko@sntech.de>
Tue, 22 Dec 2015 21:27:58 +0000 (22:27 +0100)
committerHuang, Tao <huangtao@rock-chips.com>
Thu, 18 Feb 2016 11:16:34 +0000 (19:16 +0800)
commitd8a5071adefcfec9b6568e975e03d42df0b5669f
tree5c8b79164509d98598023a8deb03a374b3289f61
parent5be7e246ef555371dc7c947809c8443c54134a1b
UPSTREAM: clk: add flag for clocks that need to be enabled on rate changes

Some clocks need to be enabled to accept rate changes. This patch adds a
new flag CLK_SET_RATE_UNGATE that lets clk_change_rate enable the clock
before trying to change the rate and disable it again afterwards.
This of course doesn't effect clocks that are already running at that
point, as their refcount will only temporarily increase.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Reviewed-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
(cherry picked from commit 2eb8c7104c648ad4bfae1f5333f98c09522149b5)

Change-Id: I4fdabbe7120dd501f350ce2294aa5a6c1827f961
drivers/clk/clk.c
include/linux/clk-provider.h