[RFC 1/2] clk: pass the 'flags' parameter to clk_fixed()

Antony Pavlov antonynpavlov at gmail.com
Thu Dec 6 03:25:35 EST 2012


The 'flags' parameter make possible creation
of a 'CLK_ALWAYS_ENABLED' clock without code overhead.

Signed-off-by: Antony Pavlov <antonynpavlov at gmail.com>
---
 drivers/clk/clk-fixed.c |    3 ++-
 include/linux/clk.h     |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/clk-fixed.c b/drivers/clk/clk-fixed.c
index fa89cb2..5ac5663 100644
--- a/drivers/clk/clk-fixed.c
+++ b/drivers/clk/clk-fixed.c
@@ -36,7 +36,7 @@ struct clk_ops clk_fixed_ops = {
 	.recalc_rate = clk_fixed_recalc_rate,
 };
 
-struct clk *clk_fixed(const char *name, int rate)
+struct clk *clk_fixed(const char *name, int rate, unsigned long flags)
 {
 	struct clk_fixed *fix = xzalloc(sizeof *fix);
 	int ret;
@@ -44,6 +44,7 @@ struct clk *clk_fixed(const char *name, int rate)
 	fix->rate = rate;
 	fix->clk.ops = &clk_fixed_ops;
 	fix->clk.name = name;
+	fix->clk.flags = flags;
 
 	ret = clk_register(&fix->clk);
 	if (ret) {
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 1030b50..9d89a21 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -184,7 +184,7 @@ struct clk {
 
 #define CLK_ALWAYS_ENABLED	(1 << 0)
 
-struct clk *clk_fixed(const char *name, int rate);
+struct clk *clk_fixed(const char *name, int rate, unsigned long flags);
 struct clk *clk_divider(const char *name, const char *parent,
 		void __iomem *reg, u8 shift, u8 width);
 struct clk *clk_fixed_factor(const char *name,
-- 
1.7.10.4




More information about the barebox mailing list