summaryrefslogtreecommitdiffstats
path: root/include/linux/clk.h
diff options
context:
space:
mode:
authorBeniamino Galvani <b.galvani@gmail.com>2014-04-27 11:30:38 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-04-29 08:15:24 +0200
commit32a2a673c6d24a85751f88fb14bb8302fc11c4a9 (patch)
tree9a6fb8481232cba8e91d89ed6cb9fc78fff385ef /include/linux/clk.h
parent75c0f6f879dee44de3bb3b388ab3430543677b93 (diff)
downloadbarebox-32a2a673c6d24a85751f88fb14bb8302fc11c4a9.tar.gz
barebox-32a2a673c6d24a85751f88fb14bb8302fc11c4a9.tar.xz
clk: gate: add flags argument to clock gate constructor
This adds a clk_gate_flags argument to clock gate creation functions to allow the introduction of new clock gate modifiers. Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/linux/clk.h')
-rw-r--r--include/linux/clk.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/clk.h b/include/linux/clk.h
index dd9fab7297..fbfdd4f899 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -199,6 +199,8 @@ static inline int clk_set_rate(struct clk *clk, unsigned long rate)
#define CLK_SET_RATE_PARENT (1 << 0) /* propagate rate change up one level */
+#define CLK_GATE_INVERTED (1 << 0)
+
struct clk_ops {
int (*enable)(struct clk *clk);
void (*disable)(struct clk *clk);
@@ -267,10 +269,11 @@ struct clk *clk_mux(const char *name, void __iomem *reg,
unsigned flags);
struct clk *clk_gate_alloc(const char *name, const char *parent,
- void __iomem *reg, u8 shift, unsigned flags);
+ void __iomem *reg, u8 shift, unsigned flags,
+ u8 clk_gate_flags);
void clk_gate_free(struct clk *clk_gate);
struct clk *clk_gate(const char *name, const char *parent, void __iomem *reg,
- u8 shift, unsigned flags);
+ u8 shift, unsigned flags, u8 clk_gate_flags);
struct clk *clk_gate_inverted(const char *name, const char *parent, void __iomem *reg,
u8 shift, unsigned flags);
int clk_is_enabled(struct clk *clk);