summaryrefslogtreecommitdiffstats
path: root/include/linux/clk.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-12-07 10:34:31 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2013-03-15 09:53:30 +0100
commit87eebfe9662506ca1d699150a27f6d524ac79a51 (patch)
tree5fb0451d104d144c359afef23f576dc22fe7a6c9 /include/linux/clk.h
parentd34aca4c09615870b694820dc21049bd1e77030e (diff)
downloadbarebox-87eebfe9662506ca1d699150a27f6d524ac79a51.tar.gz
barebox-87eebfe9662506ca1d699150a27f6d524ac79a51.tar.xz
clk: Add is_enabled callback
This allows us to better detect whether a clk is enabled or not. - If we can ask a clk, ask it. If it's enabled, go on and ask parents - If we can't ask it, but it can be enabled, depend on the enable_count. if it's positive, go on and ask parents - If we can't ask it and it cannot be enabled, assume it is enabled and ask parents. This makes the CLK_ALWAYS_ENABLED unnecessary, since the fixed clk now always returns 1 in its is_enabled callback. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/linux/clk.h')
-rw-r--r--include/linux/clk.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 4389cf8b93..37a4813ba5 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -182,8 +182,6 @@ struct clk {
unsigned long flags;
};
-#define CLK_ALWAYS_ENABLED (1 << 0)
-
struct clk_div_table {
unsigned int val;
unsigned int div;
@@ -202,6 +200,8 @@ struct clk *clk_mux(const char *name, void __iomem *reg,
struct clk *clk_gate(const char *name, const char *parent, void __iomem *reg,
u8 shift);
+int clk_is_enabled_always(struct clk *clk);
+
int clk_register(struct clk *clk);
struct clk *clk_lookup(const char *name);