public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
From: Jim Quinlan <jim2101024@gmail.com>
To: <mturquette@linaro.org>, <linux-clk@vger.kernel.org>
Cc: <bcm-kernel-feedback-list@broadcom.com>,
	Jim Quinlan <jim2101024@gmail.com>
Subject: [PATCH] clk: export function clk_disable_unused()
Date: Fri, 15 May 2015 18:22:36 -0400	[thread overview]
Message-ID: <1431728556-620-1-git-send-email-jim2101024@gmail.com> (raw)

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

             reply	other threads:[~2015-05-15 22:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-15 22:22 Jim Quinlan [this message]
2015-05-23 19:33 ` [PATCH] clk: export function clk_disable_unused() 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1431728556-620-1-git-send-email-jim2101024@gmail.com \
    --to=jim2101024@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=mturquette@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox