aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk/imx
diff options
context:
space:
mode:
authorPeng Fan <peng.fan@nxp.com>2019-12-12 02:59:04 +0000
committerShawn Guo <shawnguo@kernel.org>2019-12-23 11:50:51 +0800
commit02cb0228e98c01e0e78c71ae4763317bd6fb9455 (patch)
tree53ada0f92c1658c9104f28f297870d3180440c6d /drivers/clk/imx
parentclk: imx: add hw API imx_clk_hw_mux2_flags (diff)
downloadlinux-dev-02cb0228e98c01e0e78c71ae4763317bd6fb9455.tar.xz
linux-dev-02cb0228e98c01e0e78c71ae4763317bd6fb9455.zip
clk: imx: gate3: Switch to clk_hw based API
Switch the imx_clk_hw_gate3_flags function to clk_hw based API, rename accordingly and add a macro for clk based legacy. This allows us to move closer to a clear split between consumer and provider clk APIs. Reviewed-by: Abel Vesa <abel.vesa@nxp.com> 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.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h
index e28166a63894..65d80c675aa9 100644
--- a/drivers/clk/imx/clk.h
+++ b/drivers/clk/imx/clk.h
@@ -370,15 +370,18 @@ static inline struct clk_hw *imx_clk_hw_gate3(const char *name, const char *pare
reg, shift, 0, &imx_ccm_lock);
}
-static inline struct clk *imx_clk_gate3_flags(const char *name,
+static inline struct clk_hw *imx_clk_hw_gate3_flags(const char *name,
const char *parent, void __iomem *reg, u8 shift,
unsigned long flags)
{
- return clk_register_gate(NULL, name, parent,
+ return clk_hw_register_gate(NULL, name, parent,
flags | CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE,
reg, shift, 0, &imx_ccm_lock);
}
+#define imx_clk_gate3_flags(name, parent, reg, shift, flags) \
+ to_clk(imx_clk_hw_gate3_flags(name, parent, reg, shift, flags))
+
static inline struct clk_hw *imx_clk_hw_gate4(const char *name, const char *parent,
void __iomem *reg, u8 shift)
{