summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2021-06-02 11:54:59 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2021-06-07 12:46:13 +0200
commit04459b4da27d0a957b4ce0782421e78de8e9a9de (patch)
tree488708e6a704a4756101972548b7d3fd2bfb4bf5 /include
parent057975c2e40b965eb0a2a0f5613afb29aa2e0f97 (diff)
downloadbarebox-04459b4da27d0a957b4ce0782421e78de8e9a9de.tar.gz
barebox-04459b4da27d0a957b4ce0782421e78de8e9a9de.tar.xz
clk: Add Linux functions to register a gate
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@pengutronix.de> Link: https://lore.barebox.org/20210602095507.24609-17-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/clk.h4
1 files changed, 4 insertions, 0 deletions
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);