From: Martyn Welch <martyn.welch@collabora.com>
To: "Uwe Kleine-König" <ukleinek@kernel.org>
Cc: kernel@collabora.com, Martyn Welch <martyn.welch@collabora.com>,
Sebastian Reichel <sebastian.reichel@collabora.com>,
linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] pwm: rz-mtu3: Share parent device node to MTU3 PWM
Date: Thu, 9 Oct 2025 17:24:44 +0100 [thread overview]
Message-ID: <20251009162445.701589-1-martyn.welch@collabora.com> (raw)
The PWM currently functions, however if we try to utilise the pwn in a
device tree, for example as a pwm-backlight:
lcd_bl: backlight {
compatible = "pwm-backlight";
pwms = <&mtu3 3 833333>;
...
This fails:
[ 15.603948] platform backlight: deferred probe pending: pwm-backlight: unable to request PWM
The PWM driver forms part of the Renesas Multi-Function Timer Pulse Unit
3. The PWM does not have a DT node of it's own. Share the DT node of the
parent MFD device, so that the PWM channels can be referenced via phandles.
Co-developed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Martyn Welch <martyn.welch@collabora.com>
---
drivers/pwm/pwm-rz-mtu3.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/pwm/pwm-rz-mtu3.c b/drivers/pwm/pwm-rz-mtu3.c
index ab39bd37edafc..5825875fa0128 100644
--- a/drivers/pwm/pwm-rz-mtu3.c
+++ b/drivers/pwm/pwm-rz-mtu3.c
@@ -523,6 +523,12 @@ static int rz_mtu3_pwm_probe(struct platform_device *pdev)
if (ret < 0)
return ret;
+ /*
+ * There is only one DT node, get it from the parent MFD device, so
+ * that the PWM channels can be referenced via phandles
+ */
+ dev->of_node = dev->parent->of_node;
+
chip->ops = &rz_mtu3_pwm_ops;
ret = devm_pwmchip_add(&pdev->dev, chip);
if (ret)
--
2.51.0
next reply other threads:[~2025-10-09 16:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-09 16:24 Martyn Welch [this message]
2025-10-21 10:19 ` Uwe Kleine-König
2025-10-21 10:47 ` Krzysztof Kozlowski
2025-11-04 11:23 ` Uwe Kleine-König
2025-12-24 6:33 ` Uwe Kleine-König
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=20251009162445.701589-1-martyn.welch@collabora.com \
--to=martyn.welch@collabora.com \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=sebastian.reichel@collabora.com \
--cc=ukleinek@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
all inboxes | Powered by JetHome®