aboutsummaryrefslogtreecommitdiff
path: root/include/linux/clk-provider.h
diff options
context:
space:
mode:
authorPeng Fan2019-07-31 07:01:54 +0000
committerLukasz Majewski2019-07-31 09:20:51 +0200
commit00097635888f9104da7f7cceaf1858ec8987e86f (patch)
treec45314cb2412a6bf8f19622274c9ce509c913991 /include/linux/clk-provider.h
parentd669d1ae03977c70a4adb8a085cbfd701ae95b28 (diff)
clk: add composite clk support
Import clk composite clk support from Linux Kernel 5.1-rc5 Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'include/linux/clk-provider.h')
-rw-r--r--include/linux/clk-provider.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 522e73e8517..b9547736ee2 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -137,6 +137,28 @@ struct clk_fixed_rate {
#define to_clk_fixed_rate(dev) ((struct clk_fixed_rate *)dev_get_platdata(dev))
+struct clk_composite {
+ struct clk clk;
+ struct clk_ops ops;
+
+ struct clk *mux;
+ struct clk *rate;
+ struct clk *gate;
+
+ const struct clk_ops *mux_ops;
+ const struct clk_ops *rate_ops;
+ const struct clk_ops *gate_ops;
+};
+
+#define to_clk_composite(_clk) container_of(_clk, struct clk_composite, clk)
+
+struct clk *clk_register_composite(struct device *dev, const char *name,
+ const char * const *parent_names, int num_parents,
+ struct clk *mux_clk, const struct clk_ops *mux_ops,
+ struct clk *rate_clk, const struct clk_ops *rate_ops,
+ struct clk *gate_clk, const struct clk_ops *gate_ops,
+ unsigned long flags);
+
int clk_register(struct clk *clk, const char *drv_name, const char *name,
const char *parent_name);