linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: linux-clk@vger.kernel.org
Cc: Marek Vasut <marex@denx.de>, Abel Vesa <abel.vesa@nxp.com>,
	Fabio Estevam <festevam@gmail.com>, Jacky Bai <ping.bai@nxp.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Lucas Stach <l.stach@pengutronix.de>,
	Michael Turquette <mturquette@baylibre.com>,
	Shawn Guo <shawnguo@kernel.org>, Stephen Boyd <sboyd@kernel.org>,
	linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com
Subject: [PATCH v3 2/6] clk: Introduce devm_clk_hw_register_gate_parent_data()
Date: Sat, 25 Jun 2022 03:32:31 +0200	[thread overview]
Message-ID: <20220625013235.710346-2-marex@denx.de> (raw)
In-Reply-To: <20220625013235.710346-1-marex@denx.de>

Add an API for clock gate that uses parent_data for the parent instead of
a string parent_name.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Abel Vesa <abel.vesa@nxp.com>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Jacky Bai <ping.bai@nxp.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-clk@vger.kernel.org
Cc: linux-imx@nxp.com
---
V3: New patch
---
 include/linux/clk-provider.h | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 1f5dff4507812..4d9212b0f571f 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -570,6 +570,25 @@ 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 - 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.35.1


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

  reply	other threads:[~2022-06-25  1:34 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-25  1:32 [PATCH v3 1/6] clk: Introduce devm_clk_hw_register_mux_parent_data() Marek Vasut
2022-06-25  1:32 ` Marek Vasut [this message]
2022-06-25  1:32 ` [PATCH v3 3/6] clk: imx: imx8mp: Add audiomix block control Marek Vasut
2022-06-27 15:35   ` Abel Vesa
2022-06-27 16:23     ` Marek Vasut
2022-06-28  7:44       ` Abel Vesa
2022-06-28 17:06         ` Marek Vasut
2022-06-29  7:41           ` Abel Vesa
2022-08-04  9:13           ` Peng Fan
2022-08-04  9:31             ` Marek Vasut
2022-08-11 14:20               ` Abel Vesa
2022-08-11 14:30                 ` Marek Vasut
2022-08-11 15:03                   ` Abel Vesa
2022-08-11 15:14                     ` Abel Vesa
2022-08-11 16:38                     ` Marek Vasut
2022-08-11 16:51                       ` Abel Vesa
2022-06-29  7:43   ` Abel Vesa
     [not found]   ` <CAA+D8ANLrPML3Hp3fYyfiSSUs9V6xAu55d4Y2-8cVVAuTNwaMw@mail.gmail.com>
2022-10-19 14:33     ` Marek Vasut
     [not found]       ` <CAA+D8ANdOQaz05_SCmTgEW_bCS4ABBLgMzXese_3WWiF8WxzqA@mail.gmail.com>
2022-10-25 21:10         ` Marek Vasut
     [not found]           ` <CAA+D8AO3KZr9uxS-T1LXK568EeE-wf8yxGCYiayBBxFKDF_HZQ@mail.gmail.com>
2022-10-26 11:03             ` Marek Vasut
2023-02-22 16:58   ` Luca Ceresoli
2022-06-25  1:32 ` [PATCH v3 4/6] dt-bindings: clock: " Marek Vasut
2022-06-25  1:32 ` [PATCH v3 5/6] arm64: dts: imx8mp: Add SAI, SDMA, AudioMIX Marek Vasut
2023-02-22 16:59   ` Luca Ceresoli
2022-06-25  1:32 ` [PATCH v3 6/6] arm64: dts: imx8mp: Add analog audio output on i.MX8MP EVK Marek Vasut
2023-02-22 17:22   ` Luca Ceresoli
2023-02-22 17:25     ` [PATCH] arm64: dts: imx8mp-msc-sm2s: Add sound card Luca Ceresoli
2023-02-22 17:59       ` Marco Felsch
2023-02-22 18:39         ` Marek Vasut
2023-02-22 19:02           ` Marco Felsch
2023-02-23 16:23             ` Marek Vasut
2023-02-24 12:56               ` Marco Felsch
2023-02-22 19:57         ` Luca Ceresoli
2023-02-22 18:20       ` Krzysztof Kozlowski
2023-02-23  7:30       ` kernel test robot
2023-02-23 16:24     ` [PATCH v3 6/6] arm64: dts: imx8mp: Add analog audio output on i.MX8MP EVK Marek Vasut
2023-02-24 16:16       ` Luca Ceresoli
2022-10-10  6:20 ` [PATCH v3 3/6] clk: imx: imx8mp: Add audiomix block control Shengjiu Wang
2022-11-21  8:17 ` [PATCH v3 1/6] clk: Introduce devm_clk_hw_register_mux_parent_data() Richard Leitner
2022-11-26 15:23   ` Marek Vasut

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=20220625013235.710346-2-marex@denx.de \
    --to=marex@denx.de \
    --cc=abel.vesa@nxp.com \
    --cc=festevam@gmail.com \
    --cc=l.stach@pengutronix.de \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=mturquette@baylibre.com \
    --cc=ping.bai@nxp.com \
    --cc=sboyd@kernel.org \
    --cc=shawnguo@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 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).