All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qin Jian <qinjian@cqplus1.com>
To: sboyd@kernel.org
Cc: krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org,
	mturquette@baylibre.com, linux@armlinux.org.uk, arnd@arndb.de,
	olof@lixom.net, soc@kernel.org,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
	Qin Jian <qinjian@cqplus1.com>
Subject: [PATCH v19 05/11] clk: gate: Add devm_clk_hw_register_gate_parent_data()
Date: Thu, 16 Jun 2022 14:42:21 +0800	[thread overview]
Message-ID: <70efe3b8ba941d897599ba8a61ae31984dbd3ed2.1655360818.git.qinjian@cqplus1.com> (raw)
In-Reply-To: <cover.1655360818.git.qinjian@cqplus1.com>

Add devm_clk_hw_register_gate_parent_data() - devres-managed version
of clk_hw_register_gate_parent_data()

Signed-off-by: Qin Jian <qinjian@cqplus1.com>
---
 include/linux/clk-provider.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index c10dc4c65..179346c5c 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -567,6 +567,23 @@ struct clk *clk_register_gate(struct device *dev, const char *name,
 	__devm_clk_hw_register_gate((dev), NULL, (name), (parent_name), NULL, \
 			       NULL, (flags), (reg), (bit_idx),		      \
 			       (clk_gate_flags), (lock))
+/**
+ * devm_clk_hw_register_gate_parent_data - register a gate clock with the
+ * clock framework
+ * @dev: device that is registering this clock
+ * @name: name of this clock
+ * @parent_data: parent clk data
+ * @flags: framework-specific flags for this clock
+ * @reg: register address to control gating of this clock
+ * @bit_idx: which bit in the register controls gating of this clock
+ * @clk_gate_flags: gate-specific flags for this clock
+ * @lock: shared register lock for this clock
+ */
+#define devm_clk_hw_register_gate_parent_data(dev, name, parent_data, flags,  \
+				       reg, bit_idx, clk_gate_flags, lock)    \
+	__devm_clk_hw_register_gate((dev), NULL, (name), NULL, NULL,	      \
+			       (parent_data), (flags), (reg), (bit_idx),      \
+			       (clk_gate_flags), (lock))
 void clk_unregister_gate(struct clk *clk);
 void clk_hw_unregister_gate(struct clk_hw *hw);
 int clk_gate_is_enabled(struct clk_hw *hw);
-- 
2.33.1


WARNING: multiple messages have this Message-ID (diff)
From: Qin Jian <qinjian@cqplus1.com>
To: sboyd@kernel.org
Cc: krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org,
	mturquette@baylibre.com, linux@armlinux.org.uk, arnd@arndb.de,
	olof@lixom.net, soc@kernel.org,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
	Qin Jian <qinjian@cqplus1.com>
Subject: [PATCH v19 05/11] clk: gate: Add devm_clk_hw_register_gate_parent_data()
Date: Thu, 16 Jun 2022 14:42:21 +0800	[thread overview]
Message-ID: <70efe3b8ba941d897599ba8a61ae31984dbd3ed2.1655360818.git.qinjian@cqplus1.com> (raw)
In-Reply-To: <cover.1655360818.git.qinjian@cqplus1.com>

Add devm_clk_hw_register_gate_parent_data() - devres-managed version
of clk_hw_register_gate_parent_data()

Signed-off-by: Qin Jian <qinjian@cqplus1.com>
---
 include/linux/clk-provider.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index c10dc4c65..179346c5c 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -567,6 +567,23 @@ struct clk *clk_register_gate(struct device *dev, const char *name,
 	__devm_clk_hw_register_gate((dev), NULL, (name), (parent_name), NULL, \
 			       NULL, (flags), (reg), (bit_idx),		      \
 			       (clk_gate_flags), (lock))
+/**
+ * devm_clk_hw_register_gate_parent_data - register a gate clock with the
+ * clock framework
+ * @dev: device that is registering this clock
+ * @name: name of this clock
+ * @parent_data: parent clk data
+ * @flags: framework-specific flags for this clock
+ * @reg: register address to control gating of this clock
+ * @bit_idx: which bit in the register controls gating of this clock
+ * @clk_gate_flags: gate-specific flags for this clock
+ * @lock: shared register lock for this clock
+ */
+#define devm_clk_hw_register_gate_parent_data(dev, name, parent_data, flags,  \
+				       reg, bit_idx, clk_gate_flags, lock)    \
+	__devm_clk_hw_register_gate((dev), NULL, (name), NULL, NULL,	      \
+			       (parent_data), (flags), (reg), (bit_idx),      \
+			       (clk_gate_flags), (lock))
 void clk_unregister_gate(struct clk *clk);
 void clk_hw_unregister_gate(struct clk_hw *hw);
 int clk_gate_is_enabled(struct clk_hw *hw);
-- 
2.33.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2022-06-16  6:54 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-16  6:42 [PATCH v19 00/11] Add Sunplus SP7021 SoC Support Qin Jian
2022-06-16  6:42 ` Qin Jian
2022-06-16  6:42 ` [PATCH v19 01/11] dt-bindings: arm: sunplus: Add bindings for Sunplus SP7021 SoC boards Qin Jian
2022-06-16  6:42   ` Qin Jian
2022-06-16  6:42 ` [PATCH v19 02/11] dt-bindings: reset: Add bindings for SP7021 reset driver Qin Jian
2022-06-16  6:42   ` Qin Jian
2022-06-16  6:42 ` [PATCH v19 03/11] reset: Add Sunplus " Qin Jian
2022-06-16  6:42   ` Qin Jian
2022-06-16  6:42 ` [PATCH v19 04/11] dt-bindings: clock: Add bindings for SP7021 clock driver Qin Jian
2022-06-16  6:42   ` Qin Jian
2022-06-16  6:42 ` Qin Jian [this message]
2022-06-16  6:42   ` [PATCH v19 05/11] clk: gate: Add devm_clk_hw_register_gate_parent_data() Qin Jian
2022-06-16  6:42 ` [PATCH v19 06/11] clk: Add Sunplus SP7021 clock driver Qin Jian
2022-06-16  6:42   ` Qin Jian
2022-06-16  6:42 ` [PATCH v19 07/11] dt-bindings: interrupt-controller: Add bindings for SP7021 interrupt controller Qin Jian
2022-06-16  6:42   ` Qin Jian
2022-06-16  6:42 ` [PATCH v19 08/11] irqchip: Add Sunplus SP7021 interrupt controller driver Qin Jian
2022-06-16  6:42   ` Qin Jian
2022-06-16  6:42 ` [PATCH v19 09/11] ARM: sunplus: Add initial support for Sunplus SP7021 SoC Qin Jian
2022-06-16  6:42   ` Qin Jian
2022-06-16  6:42 ` [PATCH v19 10/11] ARM: sp7021_defconfig: Add Sunplus SP7021 defconfig Qin Jian
2022-06-16  6:42   ` Qin Jian
2022-06-16  6:42 ` [PATCH v19 11/11] ARM: dts: Add Sunplus SP7021-Demo-V3 board device tree Qin Jian
2022-06-16  6:42   ` Qin Jian

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=70efe3b8ba941d897599ba8a61ae31984dbd3ed2.1655360818.git.qinjian@cqplus1.com \
    --to=qinjian@cqplus1.com \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mturquette@baylibre.com \
    --cc=olof@lixom.net \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=soc@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.