public inbox for linux-pwm@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: "Uwe Kleine-König" <ukleinek@kernel.org>,
	"Martyn Welch" <martyn.welch@collabora.com>
Cc: kernel@collabora.com,
	Sebastian Reichel <sebastian.reichel@collabora.com>,
	linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Rob Herring <robh@kernel.org>,
	Saravana Kannan <saravanak@google.com>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH] pwm: rz-mtu3: Share parent device node to MTU3 PWM
Date: Tue, 21 Oct 2025 12:47:52 +0200	[thread overview]
Message-ID: <b041fde6-afea-4233-b00b-4e8cbb294c4a@kernel.org> (raw)
In-Reply-To: <7uuuqhmkmmucmeeo5fybzld62rybyq6fjxwqqnxqr6eufis2ze@xfc2owdzfcs5>

On 21/10/2025 12:19, Uwe Kleine-König wrote:
>> 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;
>> +
> 
> I (very quickly) talked to Krzysztof about this. He said that
> of_node_get() should probably be used here. I wonder if
> device_add_of_node() is the right function to use (which uses
> of_node_get(), also handles fwnode and implements some safeguards).


I am not so sure about device_add_of_node(). You do not need to
get_device(), because reference is already hold. Although setting
dev->fwnode might make sense... But, not that important I think, works
with me.


Best regards,
Krzysztof

  reply	other threads:[~2025-10-21 10:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-09 16:24 [PATCH] pwm: rz-mtu3: Share parent device node to MTU3 PWM Martyn Welch
2025-10-21 10:19 ` Uwe Kleine-König
2025-10-21 10:47   ` Krzysztof Kozlowski [this message]
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=b041fde6-afea-4233-b00b-4e8cbb294c4a@kernel.org \
    --to=krzk@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=martyn.welch@collabora.com \
    --cc=robh@kernel.org \
    --cc=saravanak@google.com \
    --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