public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Daniel Baluta <daniel.baluta@nxp.com>,
	Gopi Krishna Menon <krishnagopi487@gmail.com>
Cc: rafael@kernel.org, daniel.lezcano@kernel.org,
	rui.zhang@intel.com, lukasz.luba@arm.com, robh@kernel.org,
	krzk+dt@kernel.org, vireshk@kernel.org, conor+dt@kernel.org,
	linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, soc@lists.linux.dev,
	simona.toaca@nxp.com, d-gole@ti.com, m-chawdhry@ti.com
Subject: Re: [PATCH 2/2] ARM: dts: st: spear: fix dtbs warning on spear thermal sensor
Date: Tue, 24 Mar 2026 11:01:05 +0100	[thread overview]
Message-ID: <5a9f84fe-5827-48e7-8e4e-699cf8ae4776@kernel.org> (raw)
In-Reply-To: <cd3400ce-295e-450f-b650-6715142ccbde@nxp.com>

On 24/03/2026 11:00, Daniel Baluta wrote:
> On 3/24/26 11:26, Krzysztof Kozlowski wrote:
>> On Mon, Mar 23, 2026 at 07:08:09PM +0530, Gopi Krishna Menon wrote:
>>> Running DTBS checks on st/spear1340-evb.dtb results in the following
>>> warning:
>>>
>>> thermal@e07008c4 (st,thermal-spear1340): Unevaluated properties are not allowed ('thermal_flags' was unexpected)
>>>   from schema $id: http://devicetree.org/schemas/thermal/st,thermal-spear1340.yaml
>> How is it possible if there is no such file?
>>
>> Did you just add new warning in patch #1 and then claim in patch #2 that
>> you fix it?
>>
>> You completely miss the point why this change is needed: how could the
>> DTS work before? It could not. And that should be your justification for
>> the patch, with explanation why it could not work.
> 
> Correct me if I'm wrong but I think there was a hidden bug here 
> 
> drivers/thermal/spear_thermal.c:spear_thermal_probe:
> 
>       if (!np || !of_property_read_u32(np, "st,thermal-flags", &val)) {
> »       »       dev_err(&pdev->dev, "Failed: DT Pdata not passed\n");                                                                                                                         
> »       »       return -EINVAL;
> »       }
> 
> So, the driver was checking for the correct property as pointed by 

Yes

> 
> bindings/thermal/spear-thermal.txt but the dts was using the wrong

No, DTS had two properties - correct one and incorrect.

> 
> property name: arch/arm/boot/dts/st/spear13xx.dtsi » » » thermal@e07008c4 { » » » » compatible = "st,thermal-spear1340"; » » » » reg = <0xe07008c4 0x4>; » » » » thermal_flags = <0x7000>; » » » }; And because this check is wrong:
> 
>       if (!np || !of_property_read_u32(np, "st,thermal-flags", &val)) {
> 
> people really didn't notice it.
> 
> The check should be:
> 
>       if (!np || of_property_read_u32(np, "st,thermal-flags", &val)) {
> »       »       dev_err(&pdev->dev, "Failed: DT Pdata not passed\n");                                                                                                                         
> »       »       return -EINVAL;
> »       }
> 
> So, this actual patch has uncovered a bug! 

Yes. Driver also has bug, so probably was never working. The point is
whatever commit is doing, the dtbs_check warning is not the
justification, because it was introduced by this patchset.

Best regards,
Krzysztof

  reply	other threads:[~2026-03-24 10:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-23 13:38 [PATCH 0/2] dt-bindings: thermal: st,thermal-spear1340: convert to dtschema Gopi Krishna Menon
2026-03-23 13:38 ` [PATCH 1/2] " Gopi Krishna Menon
2026-03-24  9:30   ` Krzysztof Kozlowski
2026-03-27  8:06     ` Krzysztof Kozlowski
2026-03-23 13:38 ` [PATCH 2/2] ARM: dts: st: spear: fix dtbs warning on spear thermal sensor Gopi Krishna Menon
2026-03-24  9:26   ` Krzysztof Kozlowski
2026-03-24  9:27     ` Krzysztof Kozlowski
2026-03-24 10:00     ` Daniel Baluta
2026-03-24 10:01       ` Krzysztof Kozlowski [this message]
2026-03-24 13:30         ` Gopi Krishna Menon
2026-03-24 13:34           ` Gopi Krishna Menon
2026-03-24  4:07 ` [PATCH 0/2] dt-bindings: thermal: st,thermal-spear1340: convert to dtschema Viresh Kumar

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=5a9f84fe-5827-48e7-8e4e-699cf8ae4776@kernel.org \
    --to=krzk@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=d-gole@ti.com \
    --cc=daniel.baluta@nxp.com \
    --cc=daniel.lezcano@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krishnagopi487@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=m-chawdhry@ti.com \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=simona.toaca@nxp.com \
    --cc=soc@lists.linux.dev \
    --cc=vireshk@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