linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V3 1/4] clk: imx: gate4: Switch imx_clk_gate4_flags() to clk_hw based API
@ 2020-01-08  1:53 Anson Huang
  2020-01-08  1:53 ` [PATCH V3 2/4] dt-bindings: imx: Add clock binding doc for i.MX8MP Anson Huang
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Anson Huang @ 2020-01-08  1:53 UTC (permalink / raw)
  To: mturquette, sboyd, robh+dt, mark.rutland, shawnguo, s.hauer,
	kernel, festevam, catalin.marinas, will, bjorn.andersson, olof,
	maxime, leonard.crestez, dinguyen, marcin.juszkiewicz, ping.bai,
	abel.vesa, nsekhar, t-kristo, peng.fan, yuehaibing, aisheng.dong,
	sfr, linux-clk, devicetree, linux-arm-kernel, linux-kernel
  Cc: Linux-imx

Switch the imx_clk_gate4_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.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
Changes since V2:
	- Switch to latest i.MX clock driver base to redo the patch.
---
 drivers/clk/imx/clk.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h
index 65d80c6..b05213b 100644
--- a/drivers/clk/imx/clk.h
+++ b/drivers/clk/imx/clk.h
@@ -390,15 +390,18 @@ static inline struct clk_hw *imx_clk_hw_gate4(const char *name, const char *pare
 			reg, shift, 0x3, 0, &imx_ccm_lock, NULL);
 }
 
-static inline struct clk *imx_clk_gate4_flags(const char *name,
+static inline struct clk_hw *imx_clk_hw_gate4_flags(const char *name,
 		const char *parent, void __iomem *reg, u8 shift,
 		unsigned long flags)
 {
-	return clk_register_gate2(NULL, name, parent,
+	return clk_hw_register_gate2(NULL, name, parent,
 			flags | CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE,
 			reg, shift, 0x3, 0, &imx_ccm_lock, NULL);
 }
 
+#define imx_clk_gate4_flags(name, parent, reg, shift, flags) \
+	to_clk(imx_clk_hw_gate4_flags(name, parent, reg, shift, flags))
+
 static inline struct clk_hw *imx_clk_hw_mux(const char *name, void __iomem *reg,
 			u8 shift, u8 width, const char * const *parents,
 			int num_parents)
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-01-12  6:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-08  1:53 [PATCH V3 1/4] clk: imx: gate4: Switch imx_clk_gate4_flags() to clk_hw based API Anson Huang
2020-01-08  1:53 ` [PATCH V3 2/4] dt-bindings: imx: Add clock binding doc for i.MX8MP Anson Huang
2020-01-08  1:53 ` [PATCH V3 3/4] clk: imx: Add support for i.MX8MP clock driver Anson Huang
2020-01-08  1:53 ` [PATCH V3 4/4] arm64: defconfig: Enable CONFIG_CLK_IMX8MP by default Anson Huang
2020-01-08  8:30 ` [PATCH V3 1/4] clk: imx: gate4: Switch imx_clk_gate4_flags() to clk_hw based API Abel Vesa
2020-01-12  6:09 ` Shawn Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).