From: Marek Vasut <marek.vasut@mailbox.org>
To: Geert Uytterhoeven <geert+renesas@glider.be>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Brian Masney <bmasney@redhat.com>, Ulf Hansson <ulfh@kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Marek Vasut <marek.vasut+renesas@mailbox.org>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: devicetree@vger.kernel.org, linux-clk@vger.kernel.org,
linux-pm@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/6] clk: renesas: Add R-Car X5H CPG driver
Date: Wed, 8 Jul 2026 14:40:56 +0200 [thread overview]
Message-ID: <80a31a21-9876-48a7-a9ed-baac4f87bc11@mailbox.org> (raw)
In-Reply-To: <50f5804f00c55cd60604d00da1bf1f1dc912ba8d.1783505142.git.geert+renesas@glider.be>
On 7/8/26 12:15 PM, Geert Uytterhoeven wrote:
[...]
> +static int register_fixed_clks(struct r8a78000_cpg_priv *priv)
> +{
> + struct device *dev = priv->dev;
> + unsigned long rate;
> + struct clk_hw *hw;
> + const char *name;
> +
> + for (unsigned int i = 0; i < ARRAY_SIZE(fixed_clk_rates); i++) {
> + rate = fixed_clk_rates[i];
> + name = devm_kasprintf(dev, GFP_KERNEL, "cpg-%lu", rate);
> + if (!name)
> + return -ENOMEM;
> +
> + hw = clk_hw_register_fixed_rate(dev, name, NULL, 0, rate);
Would it be viable to use devm_clk_hw_register_fixed_rate() here ?
> + if (IS_ERR(hw)) {
> + while (i-- > 0)
> + clk_hw_unregister_fixed_rate(priv->fixed_hws[i]);
> + return PTR_ERR(hw);
> + }
> +
> + priv->fixed_hws[i] = hw;
> + }
> +
> + return devm_add_action_or_reset(dev, unregister_fixed_clks, priv);
> +}
[...]
next prev parent reply other threads:[~2026-07-08 21:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 10:15 [PATCH v2 0/6] R-Car X5H CPG/MDLC support Geert Uytterhoeven
2026-07-08 10:15 ` [PATCH v2 1/6] dt-bindings: clock: Document Renesas R-Car X5H Clock Pulse Generator Geert Uytterhoeven
2026-07-08 16:32 ` Conor Dooley
2026-07-08 10:15 ` [PATCH v2 2/6] dt-bindings: power: Document Renesas R-Car X5H Module Controller Geert Uytterhoeven
2026-07-08 12:38 ` Marek Vasut
2026-07-08 16:32 ` Conor Dooley
2026-07-08 10:15 ` [PATCH v2 3/6] clk: renesas: Add R-Car X5H CPG driver Geert Uytterhoeven
2026-07-08 12:40 ` Marek Vasut [this message]
2026-07-09 9:49 ` Geert Uytterhoeven
2026-07-08 10:15 ` [PATCH v2 4/6] pmdomain: renesas: Add R-Car X5H MDLC driver Geert Uytterhoeven
2026-07-08 12:47 ` Marek Vasut
2026-07-09 10:29 ` Geert Uytterhoeven
2026-07-08 10:15 ` [PATCH v2 5/6] arm64: dts: renesas: r8a78000: Add CPG node Geert Uytterhoeven
2026-07-08 12:51 ` Marek Vasut
2026-07-08 10:15 ` [PATCH v2 6/6] arm64: dts: renesas: r8a78000: Add MDLC nodes Geert Uytterhoeven
2026-07-08 13:07 ` Marek Vasut
2026-07-09 10:24 ` Geert Uytterhoeven
2026-07-09 11:24 ` 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=80a31a21-9876-48a7-a9ed-baac4f87bc11@mailbox.org \
--to=marek.vasut@mailbox.org \
--cc=bmasney@redhat.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=krzk+dt@kernel.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=marek.vasut+renesas@mailbox.org \
--cc=mturquette@baylibre.com \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=ulfh@kernel.org \
--cc=wsa+renesas@sang-engineering.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