[PATCH 03/17] clk: add prototype for clk_is_enabled

Sascha Hauer s.hauer at pengutronix.de
Thu Jun 20 02:54:07 EDT 2013

On MXS we need to poll the busy bit when changing a clock rate, but only
when the parent clocks are enabled. This exposes the already present
function clk_is_enabled which is suitable for this job.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
 drivers/clk/clk.c   | 2 +-
 include/linux/clk.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index a3def53..690a0c6 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -208,7 +208,7 @@ int clk_register(struct clk *clk)
 	return 0;
-static int clk_is_enabled(struct clk *clk)
+int clk_is_enabled(struct clk *clk)
 	int enabled;
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 718faa0..38832ba 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -216,6 +216,7 @@ struct clk *clk_gate(const char *name, const char *parent, void __iomem *reg,
 		u8 shift);
 struct clk *clk_gate_inverted(const char *name, const char *parent, void __iomem *reg,
 		u8 shift);
+int clk_is_enabled(struct clk *clk);
 int clk_is_enabled_always(struct clk *clk);

More information about the barebox mailing list