From: ping.bai@nxp.com (Bai Ping)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 2/4] clk: imx: add new gate/gate2 wrapper funtion
Date: Tue, 20 Mar 2018 10:24:02 +0800 [thread overview]
Message-ID: <1521512644-25265-2-git-send-email-ping.bai@nxp.com> (raw)
In-Reply-To: <1521512644-25265-1-git-send-email-ping.bai@nxp.com>
Add new gate/gate2 wrapper function to register clocks with optional flags.
Signed-off-by: Bai Ping <ping.bai@nxp.com>
Acked-by: Dong Aisheng <aisheng.dong@nxp.com>
---
change from v3->v4:
- no
change from v4->5:
- optimize commit subject
change from v5->v6:
- no change
---
drivers/clk/imx/clk.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h
index d69c4bb..8076ec0 100644
--- a/drivers/clk/imx/clk.h
+++ b/drivers/clk/imx/clk.h
@@ -123,6 +123,13 @@ static inline struct clk *imx_clk_gate(const char *name, const char *parent,
shift, 0, &imx_ccm_lock);
}
+static inline struct clk *imx_clk_gate_flags(const char *name, const char *parent,
+ void __iomem *reg, u8 shift, unsigned long flags)
+{
+ return clk_register_gate(NULL, name, parent, flags | CLK_SET_RATE_PARENT, reg,
+ shift, 0, &imx_ccm_lock);
+}
+
static inline struct clk *imx_clk_gate_dis(const char *name, const char *parent,
void __iomem *reg, u8 shift)
{
@@ -137,6 +144,13 @@ static inline struct clk *imx_clk_gate2(const char *name, const char *parent,
shift, 0x3, 0, &imx_ccm_lock, NULL);
}
+static inline struct clk *imx_clk_gate2_flags(const char *name, const char *parent,
+ void __iomem *reg, u8 shift, unsigned long flags)
+{
+ return clk_register_gate2(NULL, name, parent, flags | CLK_SET_RATE_PARENT, reg,
+ shift, 0x3, 0, &imx_ccm_lock, NULL);
+}
+
static inline struct clk *imx_clk_gate2_shared(const char *name,
const char *parent, void __iomem *reg, u8 shift,
unsigned int *share_count)
--
1.9.1
next prev parent reply other threads:[~2018-03-20 2:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-20 2:24 [PATCH v6 1/4] clk: imx: Add CLK_IS_CRITICAL flag for busy divider and busy mux Bai Ping
2018-03-20 2:24 ` Bai Ping [this message]
2018-04-06 18:33 ` [PATCH v6 2/4] clk: imx: add new gate/gate2 wrapper funtion Stephen Boyd
2018-03-20 2:24 ` [PATCH v6 3/4] dt-bindings: imx: update clock doc for imx6sll Bai Ping
2018-04-06 18:33 ` Stephen Boyd
2018-03-20 2:24 ` [PATCH v6 4/4] clk: imx: add clock driver " Bai Ping
2018-04-06 18:33 ` Stephen Boyd
2018-04-06 18:33 ` [PATCH v6 1/4] clk: imx: Add CLK_IS_CRITICAL flag for busy divider and busy mux Stephen Boyd
2018-04-18 11:41 ` Stefan Agner
2018-04-18 13:03 ` Jacky Bai
2018-04-18 13:20 ` Stefan Agner
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=1521512644-25265-2-git-send-email-ping.bai@nxp.com \
--to=ping.bai@nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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).