summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorQin Jian <qinjian@cqplus1.com>2022-12-19 09:51:30 +0800
committerStephen Boyd <sboyd@kernel.org>2023-03-20 14:43:25 -0700
commitd54c1fd4a51e8fbc7f9da86b0cd338a4f7cd2bb2 (patch)
tree3b1cfc21e28b83be8d58c456e441af251f7b3c25 /include
parentfe15c26ee26efa11741a7b632e9f23b01aca4cc6 (diff)
downloadlinux-stable-d54c1fd4a51e8fbc7f9da86b0cd338a4f7cd2bb2.tar.gz
linux-stable-d54c1fd4a51e8fbc7f9da86b0cd338a4f7cd2bb2.tar.bz2
linux-stable-d54c1fd4a51e8fbc7f9da86b0cd338a4f7cd2bb2.zip
clk: Add Sunplus SP7021 clock driver
Add clock driver for Sunplus SP7021 SoC. Signed-off-by: Qin Jian <qinjian@cqplus1.com> Link: https://lore.kernel.org/r/20221219015130.42621-1-qinjian@cqplus1.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/clk-provider.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 842e72a5348f..0e3bc3eb9911 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -608,6 +608,25 @@ struct clk *clk_register_gate(struct device *dev, const char *name,
__devm_clk_hw_register_gate((dev), NULL, (name), (parent_name), NULL, \
NULL, (flags), (reg), (bit_idx), \
(clk_gate_flags), (lock))
+/**
+ * devm_clk_hw_register_gate_parent_data - register a gate clock with the
+ * clock framework
+ * @dev: device that is registering this clock
+ * @name: name of this clock
+ * @parent_data: parent clk data
+ * @flags: framework-specific flags for this clock
+ * @reg: register address to control gating of this clock
+ * @bit_idx: which bit in the register controls gating of this clock
+ * @clk_gate_flags: gate-specific flags for this clock
+ * @lock: shared register lock for this clock
+ */
+#define devm_clk_hw_register_gate_parent_data(dev, name, parent_data, flags, \
+ reg, bit_idx, clk_gate_flags, \
+ lock) \
+ __devm_clk_hw_register_gate((dev), NULL, (name), NULL, NULL, \
+ (parent_data), (flags), (reg), (bit_idx), \
+ (clk_gate_flags), (lock))
+
void clk_unregister_gate(struct clk *clk);
void clk_hw_unregister_gate(struct clk_hw *hw);
int clk_gate_is_enabled(struct clk_hw *hw);