linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anson Huang <Anson.Huang@nxp.com>
To: mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org,
	mark.rutland@arm.com, shawnguo@kernel.org,
	s.hauer@pengutronix.de, kernel@pengutronix.de,
	festevam@gmail.com, catalin.marinas@arm.com, will@kernel.org,
	bjorn.andersson@linaro.org, olof@lixom.net, maxime@cerno.tech,
	leonard.crestez@nxp.com, dinguyen@kernel.org,
	marcin.juszkiewicz@linaro.org, ping.bai@nxp.com,
	abel.vesa@nxp.com, nsekhar@ti.com, t-kristo@ti.com,
	peng.fan@nxp.com, yuehaibing@huawei.com, aisheng.dong@nxp.com,
	sfr@canb.auug.org.au, linux-clk@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Cc: Linux-imx@nxp.com
Subject: [PATCH V3 1/4] clk: imx: gate4: Switch imx_clk_gate4_flags() to clk_hw based API
Date: Wed,  8 Jan 2020 09:53:34 +0800	[thread overview]
Message-ID: <1578448417-17760-1-git-send-email-Anson.Huang@nxp.com> (raw)

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


             reply	other threads:[~2020-01-08  1:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-08  1:53 Anson Huang [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1578448417-17760-1-git-send-email-Anson.Huang@nxp.com \
    --to=anson.huang@nxp.com \
    --cc=Linux-imx@nxp.com \
    --cc=abel.vesa@nxp.com \
    --cc=aisheng.dong@nxp.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dinguyen@kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=leonard.crestez@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcin.juszkiewicz@linaro.org \
    --cc=mark.rutland@arm.com \
    --cc=maxime@cerno.tech \
    --cc=mturquette@baylibre.com \
    --cc=nsekhar@ti.com \
    --cc=olof@lixom.net \
    --cc=peng.fan@nxp.com \
    --cc=ping.bai@nxp.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=sboyd@kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=shawnguo@kernel.org \
    --cc=t-kristo@ti.com \
    --cc=will@kernel.org \
    --cc=yuehaibing@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).