From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Hans Verkuil <hverkuil@xs4all.nl>, Andi Shyti <andi.shyti@kernel.org>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Alim Akhtar <alim.akhtar@samsung.com>,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] media: exynos4-is: fimc-is: replace duplicate pmu node with phandle
Date: Tue, 15 Aug 2023 08:02:00 +0200 [thread overview]
Message-ID: <552c1bd6-0c91-071e-bd11-8d7c8feb7bc5@linaro.org> (raw)
In-Reply-To: <9520cdcb-5262-f429-b7bc-35c4cda08c12@xs4all.nl>
On 11/08/2023 11:49, Hans Verkuil wrote:
> Hi Krzysztof,
>
> On 08/08/2023 01:13, Andi Shyti wrote:
>> Hi Krzysztof,
>>
>> [...]
>>
>>> +static void __iomem *fimc_is_get_pmu_regs(struct device *dev)
>>> +{
>>> + struct device_node *node;
>>> + void __iomem *regs;
>>> +
>>> + node = of_parse_phandle(dev->of_node, "samsung,pmu-syscon", 0);
>>> + if (!node) {
>>> + dev_warn(dev, "Finding PMU node via deprecated method, update your DTB\n");
>>> + node = of_get_child_by_name(dev->of_node, "pmu");
>>> + if (!node)
>>> + return IOMEM_ERR_PTR(-ENODEV);
>>
>> in my opinion this should be:
>>
>> ...
>> if (!node)
>> return IOMEM_ERR_PTR(-ENODEV);
>>
>> dev_warn(dev, "Finding PMU node via deprecated method, update your DTB\n");
>>
>> Because if you don't have both "samsung,pmu-syscon and "pmu" then
>> the warning should not be printed and you need to return -ENODEV.
>
> I agree with Andi for this part.
>
> The only time you want to see this message is if samsung,pmu-syscon is
> missing AND pmu is present. If both are missing, then just return ENODEV as
> it was before.
OK, understood. I will send a v3.
Best regards,
Krzysztof
WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Hans Verkuil <hverkuil@xs4all.nl>, Andi Shyti <andi.shyti@kernel.org>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Alim Akhtar <alim.akhtar@samsung.com>,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] media: exynos4-is: fimc-is: replace duplicate pmu node with phandle
Date: Tue, 15 Aug 2023 08:02:00 +0200 [thread overview]
Message-ID: <552c1bd6-0c91-071e-bd11-8d7c8feb7bc5@linaro.org> (raw)
In-Reply-To: <9520cdcb-5262-f429-b7bc-35c4cda08c12@xs4all.nl>
On 11/08/2023 11:49, Hans Verkuil wrote:
> Hi Krzysztof,
>
> On 08/08/2023 01:13, Andi Shyti wrote:
>> Hi Krzysztof,
>>
>> [...]
>>
>>> +static void __iomem *fimc_is_get_pmu_regs(struct device *dev)
>>> +{
>>> + struct device_node *node;
>>> + void __iomem *regs;
>>> +
>>> + node = of_parse_phandle(dev->of_node, "samsung,pmu-syscon", 0);
>>> + if (!node) {
>>> + dev_warn(dev, "Finding PMU node via deprecated method, update your DTB\n");
>>> + node = of_get_child_by_name(dev->of_node, "pmu");
>>> + if (!node)
>>> + return IOMEM_ERR_PTR(-ENODEV);
>>
>> in my opinion this should be:
>>
>> ...
>> if (!node)
>> return IOMEM_ERR_PTR(-ENODEV);
>>
>> dev_warn(dev, "Finding PMU node via deprecated method, update your DTB\n");
>>
>> Because if you don't have both "samsung,pmu-syscon and "pmu" then
>> the warning should not be printed and you need to return -ENODEV.
>
> I agree with Andi for this part.
>
> The only time you want to see this message is if samsung,pmu-syscon is
> missing AND pmu is present. If both are missing, then just return ENODEV as
> it was before.
OK, understood. I will send a v3.
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-08-15 6:03 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-07 13:12 [PATCH v2 1/3] media: dt-bindings: samsung,exynos4212-fimc-is: replace duplicate pmu node with phandle Krzysztof Kozlowski
2023-08-07 13:12 ` Krzysztof Kozlowski
2023-08-07 13:12 ` [PATCH v2 2/3] media: dt-bindings: samsung,fimc: correct unit addresses in DTS example Krzysztof Kozlowski
2023-08-07 13:12 ` Krzysztof Kozlowski
2023-08-07 13:12 ` [PATCH v2 3/3] media: exynos4-is: fimc-is: replace duplicate pmu node with phandle Krzysztof Kozlowski
2023-08-07 13:12 ` Krzysztof Kozlowski
2023-08-07 23:13 ` Andi Shyti
2023-08-07 23:13 ` Andi Shyti
2023-08-08 6:22 ` Krzysztof Kozlowski
2023-08-08 6:22 ` Krzysztof Kozlowski
2023-08-08 11:42 ` Andi Shyti
2023-08-08 11:42 ` Andi Shyti
2023-08-08 13:31 ` Krzysztof Kozlowski
2023-08-08 13:31 ` Krzysztof Kozlowski
2023-08-11 9:49 ` Hans Verkuil
2023-08-11 9:49 ` Hans Verkuil
2023-08-15 6:02 ` Krzysztof Kozlowski [this message]
2023-08-15 6:02 ` Krzysztof Kozlowski
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=552c1bd6-0c91-071e-bd11-8d7c8feb7bc5@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=alim.akhtar@samsung.com \
--cc=andi.shyti@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=hverkuil@xs4all.nl \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=robh+dt@kernel.org \
--cc=s.nawrocki@samsung.com \
/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.