All of lore.kernel.org
 help / color / mirror / Atom feed
From: dongxuyang@eswincomputing.com
To: mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org,
	krzk+dt@kernel.org, conor+dt@kernel.org,
	linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, troy.mitchell@linux.dev,
	bmasney@redhat.com
Cc: ningyu@eswincomputing.com, linmin@eswincomputing.com,
	huangyifeng@eswincomputing.com, pinkesh.vaghela@einfochips.com,
	ganboing@gmail.com, marcel@ziswiler.com,
	Xuyang Dong <dongxuyang@eswincomputing.com>
Subject: [PATCH v15 2/4] clk: divider: Add devm_clk_hw_register_divider_parent_data
Date: Tue,  3 Mar 2026 16:06:55 +0800	[thread overview]
Message-ID: <20260303080655.2155-1-dongxuyang@eswincomputing.com> (raw)
In-Reply-To: <20260303080513.2042-1-dongxuyang@eswincomputing.com>

From: Xuyang Dong <dongxuyang@eswincomputing.com>

Add the devres variant of clk_hw_register_divider_parent_data() for
registering a divider clock with parent clk data instead of parent
name.

Reviewed-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Xuyang Dong <dongxuyang@eswincomputing.com>
---
 include/linux/clk-provider.h | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 630705a47129..64967ac1b1df 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -947,6 +947,26 @@ struct clk *clk_register_divider_table(struct device *dev, const char *name,
 				       (parent_hw), NULL, (flags), (reg),     \
 				       (shift), (width), (clk_divider_flags), \
 				       NULL, (lock))
+/**
+ * devm_clk_hw_register_divider_parent_data - register a divider clock with the
+ * clock framework
+ * @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
+ * @lock: shared register lock for this clock
+ */
+#define devm_clk_hw_register_divider_parent_data(dev, name, parent_data,       \
+						 flags, reg, shift, width,     \
+						 clk_divider_flags, lock)      \
+	__devm_clk_hw_register_divider((dev), NULL, (name), NULL, NULL,	       \
+				       (parent_data), (flags), (reg), (shift), \
+				       (width), (clk_divider_flags), NULL,     \
+				       (lock))
 /**
  * devm_clk_hw_register_divider_table - register a table based divider clock
  * with the clock framework (devres variant)
-- 
2.34.1


  parent reply	other threads:[~2026-03-03  8:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-03  8:05 [PATCH v15 0/4] Add driver support for ESWIN eic700 SoC clock controller dongxuyang
2026-03-03  8:06 ` [PATCH v15 1/4] dt-bindings: clock: eswin: Documentation for eic7700 SoC dongxuyang
2026-03-25  2:13   ` Stephen Boyd
2026-03-03  8:06 ` dongxuyang [this message]
2026-03-25  2:12   ` [PATCH v15 2/4] clk: divider: Add devm_clk_hw_register_divider_parent_data Stephen Boyd
2026-03-03  8:07 ` [PATCH v15 3/4] clk: eswin: Add eic7700 clock driver dongxuyang
2026-03-17  8:05   ` Bo Gan
2026-03-25  2:12   ` Stephen Boyd
2026-03-03  8:07 ` [PATCH v15 4/4] MAINTAINERS: Add entry for ESWIN EIC7700 " dongxuyang
2026-03-25  2:12   ` Stephen Boyd
2026-03-16  6:54 ` [PATCH v15 0/4] Add driver support for ESWIN eic700 SoC clock controller Xuyang Dong
2026-03-16 15:04   ` Brian Masney

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=20260303080655.2155-1-dongxuyang@eswincomputing.com \
    --to=dongxuyang@eswincomputing.com \
    --cc=bmasney@redhat.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=ganboing@gmail.com \
    --cc=huangyifeng@eswincomputing.com \
    --cc=krzk+dt@kernel.org \
    --cc=linmin@eswincomputing.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@ziswiler.com \
    --cc=mturquette@baylibre.com \
    --cc=ningyu@eswincomputing.com \
    --cc=pinkesh.vaghela@einfochips.com \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=troy.mitchell@linux.dev \
    /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.