diff options
author | Peng Fan <peng.fan@nxp.com> | 2019-12-12 03:59:00 +0100 |
---|---|---|
committer | Shawn Guo <shawnguo@kernel.org> | 2019-12-23 04:50:49 +0100 |
commit | 3d43f1582c455433276d88828cdb9054bbecf2fe (patch) | |
tree | 175869ca87820bcbc34584afd263066386187077 /drivers/clk/imx | |
parent | clk: imx: add imx_unregister_hw_clocks (diff) | |
download | linux-3d43f1582c455433276d88828cdb9054bbecf2fe.tar.xz linux-3d43f1582c455433276d88828cdb9054bbecf2fe.zip |
clk: imx: add hw API imx_clk_hw_mux2_flags
Introduce hw based API imx_clk_hw_mux2_flags, then we could
convert i.MX8MN clk driver to use hw based APIs.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Diffstat (limited to 'drivers/clk/imx')
-rw-r--r-- | drivers/clk/imx/clk.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h index 20dc9a1fcd6c..e28166a63894 100644 --- a/drivers/clk/imx/clk.h +++ b/drivers/clk/imx/clk.h @@ -435,6 +435,16 @@ static inline struct clk *imx_clk_mux_flags(const char *name, &imx_ccm_lock); } +static inline struct clk_hw *imx_clk_hw_mux2_flags(const char *name, + void __iomem *reg, u8 shift, u8 width, + const char * const *parents, + int num_parents, unsigned long flags) +{ + return clk_hw_register_mux(NULL, name, parents, num_parents, + flags | CLK_SET_RATE_NO_REPARENT | CLK_OPS_PARENT_ENABLE, + reg, shift, width, 0, &imx_ccm_lock); +} + static inline struct clk *imx_clk_mux2_flags(const char *name, void __iomem *reg, u8 shift, u8 width, const char * const *parents, |