public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: export function clk_disable_unused()
@ 2015-05-15 22:22 Jim Quinlan
  2015-05-23 19:33 ` Michael Turquette
  0 siblings, 1 reply; 7+ messages in thread
From: Jim Quinlan @ 2015-05-15 22:22 UTC (permalink / raw)
  To: mturquette, linux-clk; +Cc: bcm-kernel-feedback-list, Jim Quinlan

For Broadcom STB chips, clocks may come up after resume in an "on"
state, so calling clk_disable_unused() again will turn off unused
clocks.  This commit exports clk_disable_unused() so it may be
called in such cases.

Signed-off-by: Jim Quinlan <jim2101024@gmail.com>
---
 drivers/clk/clk.c   | 2 +-
 include/linux/clk.h | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 459ce9d..4469f8b 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -549,7 +549,7 @@ static int __init clk_ignore_unused_setup(char *__unused)
 }
 __setup("clk_ignore_unused", clk_ignore_unused_setup);
 
-static int clk_disable_unused(void)
+int clk_disable_unused(void)
 {
 	struct clk_core *clk;
 
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 68c16a6..c03822c 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -265,6 +265,14 @@ int clk_enable(struct clk *clk);
 void clk_disable(struct clk *clk);
 
 /**
+ * clk_disable_unused - turns off unused clocks.
+ *
+ * This is already called as a late initcall, but may be
+ * called again in special cases such as resuming from S3.
+ */
+int clk_disable_unused(void);
+
+/**
  * clk_get_rate - obtain the current clock rate (in Hz) for a clock source.
  *		  This is only valid once the clock source has been enabled.
  * @clk: clock source
-- 
1.9.0.138.g2de3478

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-08-03 21:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-15 22:22 [PATCH] clk: export function clk_disable_unused() Jim Quinlan
2015-05-23 19:33 ` Michael Turquette
2015-05-26 12:20   ` Grygorii.Strashko@linaro.org
2015-05-28 14:21   ` Jim Quinlan
2015-05-28 15:16     ` Grygorii.Strashko@linaro.org
2015-07-23 18:32       ` Michael Turquette
2015-08-03 21:40         ` Jim Quinlan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox