From: "Jonathan Neuschäfer" <j.neuschaefer@gmx.net>
To: openbmc@lists.ozlabs.org, linux-clk@vger.kernel.org,
devicetree@vger.kernel.org
Cc: "Rob Herring" <robh@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Stephen Boyd" <sboyd@kernel.org>,
"Michael Turquette" <mturquette@baylibre.com>,
linux-kernel@vger.kernel.org,
"Jonathan Neuschäfer" <j.neuschaefer@gmx.net>,
"Krzysztof Kozlowski" <krzysztof.kozlowski@linaro.org>,
"Joel Stanley" <joel@jms.id.au>,
"Philipp Zabel" <p.zabel@pengutronix.de>
Subject: [PATCH v12 2/6] clk: Introduce devm_clk_hw_register_divider_table_parent_data()
Date: Thu, 02 May 2024 12:40:01 +0200 [thread overview]
Message-ID: <20240502-wpcm-clk-v12-2-1d065d58df07@gmx.net> (raw)
In-Reply-To: <20240502-wpcm-clk-v12-0-1d065d58df07@gmx.net>
Introduce the devm pendant to clk_hw_register_divider_table_parent_data.
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
---
include/linux/clk-provider.h | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 4a537260f6557d..5d537d0776a11f 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -932,6 +932,28 @@ struct clk *clk_register_divider_table(struct device *dev, const char *name,
(width), (clk_divider_flags), (table), \
(lock))
+/**
+ * devm_clk_hw_register_divider_table_parent_data - register a table based divider clock
+ * with the clock framework (devres variant)
+ * @dev: device registering this clock
+ * @name: name of this clock
+ * @parent_data: parent clk data
+ * @flags: framework-specific flags
+ * @reg: register address to adjust divider
+ * @shift: number of bits to shift the bitfield
+ * @width: width of the bitfield
+ * @clk_divider_flags: divider-specific flags for this clock
+ * @table: array of divider/value pairs ending with a div set to 0
+ * @lock: shared register lock for this clock
+ */
+#define devm_clk_hw_register_divider_table_parent_data(dev, name, parent_data, flags, \
+ reg, shift, width, \
+ clk_divider_flags, table, lock) \
+ __devm_clk_hw_register_divider((dev), NULL, (name), NULL, \
+ NULL, (parent_data), (flags), (reg), (shift), \
+ (width), (clk_divider_flags), (table), \
+ (lock))
+
void clk_unregister_divider(struct clk *clk);
void clk_hw_unregister_divider(struct clk_hw *hw);
--
2.43.0
next prev parent reply other threads:[~2024-05-02 10:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-02 10:39 [PATCH v12 0/6] Nuvoton WPCM450 clock and reset driver Jonathan Neuschäfer
2024-05-02 10:40 ` [PATCH v12 1/6] dt-bindings: clock: Add Nuvoton WPCM450 clock/reset controller Jonathan Neuschäfer
2024-05-02 10:40 ` Jonathan Neuschäfer [this message]
2024-05-02 10:40 ` [PATCH v12 3/6] clk: provider: Address documentation pitfall in struct clk_parent_data Jonathan Neuschäfer
2024-05-02 10:40 ` [PATCH v12 4/6] clk: wpcm450: Add Nuvoton WPCM450 clock/reset controller driver Jonathan Neuschäfer
2024-05-02 10:40 ` [PATCH v12 5/6] ARM: dts: wpcm450: Remove clock-output-names from reference clock node Jonathan Neuschäfer
2024-05-02 10:40 ` [PATCH v12 6/6] ARM: dts: wpcm450: Switch clocks to clock controller Jonathan Neuschäfer
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=20240502-wpcm-clk-v12-2-1d065d58df07@gmx.net \
--to=j.neuschaefer@gmx.net \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=joel@jms.id.au \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=openbmc@lists.ozlabs.org \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=sboyd@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 read-only IMAP folder(s) and NNTP newsgroup(s).