From: Alexander Stein <alexander.stein@ew.tq-group.com>
To: linux-clk@vger.kernel.org, Marek Vasut <marex@denx.de>
Cc: Marek Vasut <marex@denx.de>, Abel Vesa <abelvesa@kernel.org>,
Fabio Estevam <festevam@gmail.com>, Jacky Bai <ping.bai@nxp.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Lucas Stach <l.stach@pengutronix.de>,
Marco Felsch <m.felsch@pengutronix.de>,
Michael Turquette <mturquette@baylibre.com>,
NXP Linux Team <linux-imx@nxp.com>, Peng Fan <peng.fan@nxp.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Richard Cochran <richardcochran@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Shawn Guo <shawnguo@kernel.org>, Stephen Boyd <sboyd@kernel.org>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v4 1/5] clk: Introduce devm_clk_hw_register_gate_parent_data()
Date: Mon, 27 Feb 2023 09:38:29 +0100 [thread overview]
Message-ID: <8196426.T7Z3S40VBb@steina-w> (raw)
In-Reply-To: <20230223171114.59164-1-marex@denx.de>
Hi Marek,
thanks for respinning this series.
Am Donnerstag, 23. Februar 2023, 18:11:10 CET schrieb Marek Vasut:
> 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 <abelvesa@kernel.org>
> Cc: Fabio Estevam <festevam@gmail.com>
> Cc: Jacky Bai <ping.bai@nxp.com>
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Lucas Stach <l.stach@pengutronix.de>
> Cc: Marco Felsch <m.felsch@pengutronix.de>
> Cc: Michael Turquette <mturquette@baylibre.com>
> Cc: NXP Linux Team <linux-imx@nxp.com>
> Cc: Peng Fan <peng.fan@nxp.com>
> Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
> Cc: Richard Cochran <richardcochran@gmail.com>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Stephen Boyd <sboyd@kernel.org>
> Cc: devicetree@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-clk@vger.kernel.org
> ---
> V3: New patch
> V4: - Rebase on next 20230223
> ---
> 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 842e72a5348fa..92b7c794c6272 100644
> --- a/include/linux/clk-provider.h
> +++ b/include/linux/clk-provider.h
> @@ -608,6 +608,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);
Is it worth to add the parent_data paremeter into existing
devm_clk_hw_register_gate macro? Just adding this new macro for setting
parent_data instead of parent_name seems a bit too much. What if someone wants
to set parent_hw? Add another macro?
Best regards,
Alexander
--
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/
next prev parent reply other threads:[~2023-02-27 9:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-23 17:11 [PATCH v4 1/5] clk: Introduce devm_clk_hw_register_gate_parent_data() Marek Vasut
2023-02-23 17:11 ` [PATCH v4 2/5] clk: imx: imx8mp: Add audiomix block control Marek Vasut
2023-02-24 16:38 ` Luca Ceresoli
2023-02-23 17:11 ` [PATCH v4 3/5] dt-bindings: clock: " Marek Vasut
2023-02-23 17:11 ` [PATCH v4 4/5] arm64: dts: imx8mp: Add SAI, SDMA, AudioMIX Marek Vasut
2023-02-27 9:08 ` Alexander Stein
2023-02-27 11:38 ` Adam Ford
2023-02-27 12:00 ` Alexander Stein
2023-02-27 13:53 ` Marek Vasut
2023-02-23 17:11 ` [PATCH v4 5/5] arm64: dts: imx8mp: Add analog audio output on i.MX8MP EVK Marek Vasut
2023-02-23 17:28 ` Fabio Estevam
2023-02-23 17:39 ` Marek Vasut
2023-02-24 12:59 ` Marco Felsch
2023-02-24 0:24 ` [PATCH v4 1/5] clk: Introduce devm_clk_hw_register_gate_parent_data() Adam Ford
2023-02-27 8:38 ` Alexander Stein [this message]
2023-02-27 13:47 ` 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=8196426.T7Z3S40VBb@steina-w \
--to=alexander.stein@ew.tq-group.com \
--cc=abelvesa@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--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=m.felsch@pengutronix.de \
--cc=marex@denx.de \
--cc=mturquette@baylibre.com \
--cc=peng.fan@nxp.com \
--cc=ping.bai@nxp.com \
--cc=richardcochran@gmail.com \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--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).