[PATCH 16/24] clk: Add Linux functions to register a gate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Linux has clk_register_gate(). Add the same function with the same
prototype for barebox to ease code porting from Linux.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 drivers/clk/clk-gate.c | 8 ++++++++
 include/linux/clk.h    | 4 ++++
 2 files changed, 12 insertions(+)

diff --git a/drivers/clk/clk-gate.c b/drivers/clk/clk-gate.c
index 6e1bf0b316..87b7e73aa6 100644
--- a/drivers/clk/clk-gate.c
+++ b/drivers/clk/clk-gate.c
@@ -116,3 +116,11 @@ struct clk *clk_gate_inverted(const char *name, const char *parent,
 {
 	return clk_gate(name, parent, reg, shift, flags, CLK_GATE_INVERTED);
 }
+
+struct clk *clk_register_gate(struct device_d *dev, const char *name,
+		const char *parent_name, unsigned long flags,
+		void __iomem *reg, u8 bit_idx,
+		u8 clk_gate_flags, spinlock_t *lock)
+{
+	return clk_gate(name, parent_name, reg, bit_idx, flags, clk_gate_flags);
+}
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 3bb7efdc61..950fecd7e0 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -615,6 +615,10 @@ struct clk *clk_gate_inverted(const char *name, const char *parent, void __iomem
 		u8 shift, unsigned flags);
 struct clk *clk_gate_shared(const char *name, const char *parent, const char *shared,
 			    unsigned flags);
+struct clk *clk_register_gate(struct device_d *dev, const char *name,
+		const char *parent_name, unsigned long flags,
+		void __iomem *reg, u8 bit_idx,
+		u8 clk_gate_flags, spinlock_t *lock);
 
 int clk_is_enabled(struct clk *clk);
 int clk_hw_is_enabled(struct clk_hw *hw);
-- 
2.29.2


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux