public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] pwm: Add support for pwm nexus dt bindings
@ 2024-12-02 16:44 Herve Codina
  2024-12-12 16:19 ` Herve Codina
  0 siblings, 1 reply; 2+ messages in thread
From: Herve Codina @ 2024-12-02 16:44 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Rob Herring, Saravana Kannan, linux-pwm, devicetree, linux-kernel,
	Luca Ceresoli, Thomas Petazzoni, Herve Codina

Platforms can have a standardized connector/expansion slot that exposes
signals like PWMs to expansion boards in an SoC agnostic way.

The support for nexus node [1] has been added to handle those cases in
commit bd6f2fd5a1d5 ("of: Support parsing phandle argument lists through
a nexus node") and the gpio subsystem adopted the support in commit
c11e6f0f04db ("gpio: Support gpio nexus dt bindings")

Add support for nexus node dt binding in the pwm subsystem.

[1] https://github.com/devicetree-org/devicetree-specification/blob/v0.4/source/chapter2-devicetree-basics.rst#nexus-nodes-and-specifier-mapping

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
---
 drivers/pwm/core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index 9c733877e98e..4a7454841cef 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -1707,8 +1707,7 @@ static struct pwm_device *of_pwm_get(struct device *dev, struct device_node *np,
 			return ERR_PTR(index);
 	}
 
-	err = of_parse_phandle_with_args(np, "pwms", "#pwm-cells", index,
-					 &args);
+	err = of_parse_phandle_with_args_map(np, "pwms", "pwm", index, &args);
 	if (err) {
 		pr_err("%s(): can't parse \"pwms\" property\n", __func__);
 		return ERR_PTR(err);
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-12-12 16:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-02 16:44 [PATCH 1/1] pwm: Add support for pwm nexus dt bindings Herve Codina
2024-12-12 16:19 ` Herve Codina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox