diff options
author | Peng Fan <peng.fan@nxp.com> | 2019-07-31 07:01:54 +0000 |
---|---|---|
committer | Lukasz Majewski <lukma@denx.de> | 2019-07-31 09:20:51 +0200 |
commit | 00097635888f9104da7f7cceaf1858ec8987e86f (patch) | |
tree | c45314cb2412a6bf8f19622274c9ce509c913991 /include | |
parent | d669d1ae03977c70a4adb8a085cbfd701ae95b28 (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')
-rw-r--r-- | include/linux/clk-provider.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 522e73e851..b9547736ee 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); |