[PATCH 5/7] clk: imx: frac-pll: Switch to clk_hw based API
From: Peng Fan
Date: Tue Oct 29 2019 - 09:41:26 EST
From: Peng Fan <peng.fan@xxxxxxx>
Switch the imx_clk_frac_pll 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.
Signed-off-by: Peng Fan <peng.fan@xxxxxxx>
---
drivers/clk/imx/clk-frac-pll.c | 4 ++--
drivers/clk/imx/clk.h | 6 ++++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/clk/imx/clk-frac-pll.c b/drivers/clk/imx/clk-frac-pll.c
index fece503e3610..818ddb35329f 100644
--- a/drivers/clk/imx/clk-frac-pll.c
+++ b/drivers/clk/imx/clk-frac-pll.c
@@ -201,7 +201,7 @@ static const struct clk_ops clk_frac_pll_ops = {
.set_rate = clk_pll_set_rate,
};
-struct clk *imx_clk_frac_pll(const char *name, const char *parent_name,
+struct clk_hw *imx_clk_hw_frac_pll(const char *name, const char *parent_name,
void __iomem *base)
{
struct clk_init_data init;
@@ -230,5 +230,5 @@ struct clk *imx_clk_frac_pll(const char *name, const char *parent_name,
return ERR_PTR(ret);
}
- return hw->clk;
+ return hw;
}
diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h
index 49cbf6e20ad8..a260b8dd3256 100644
--- a/drivers/clk/imx/clk.h
+++ b/drivers/clk/imx/clk.h
@@ -111,8 +111,10 @@ struct clk *imx_clk_pllv1(enum imx_pllv1_type type, const char *name,
struct clk *imx_clk_pllv2(const char *name, const char *parent,
void __iomem *base);
-struct clk *imx_clk_frac_pll(const char *name, const char *parent_name,
- void __iomem *base);
+struct clk_hw *imx_clk_hw_frac_pll(const char *name, const char *parent_name,
+ void __iomem *base);
+#define imx_clk_frac_pll(name, parent_name, base) \
+ imx_clk_hw_frac_pll(name, parent_name, base)->clk
struct clk *imx_clk_sccg_pll(const char *name,
const char * const *parent_names,
--
2.16.4