clk: add flag for clocks that need to be enabled on rate changes
commit2eb8c7104c648ad4bfae1f5333f98c09522149b5
authorHeiko Stuebner <heiko@sntech.de>
Tue, 22 Dec 2015 21:27:58 +0000 (22 22:27 +0100)
committerMichael Turquette <mturquette@baylibre.com>
Wed, 23 Dec 2015 20:57:31 +0000 (23 12:57 -0800)
treee6f85898c587de5c2bae29a459c700a9c6cf341d
parent84a8c541664b037a4d1fdc3151466b4ec45c37a5
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>
drivers/clk/clk.c
include/linux/clk-provider.h