linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Rob Herring <robh@kernel.org>, Arnd Bergmann <arnd@arndb.de>
Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Avi Fishman <avifishman70@gmail.com>,
	Tomer Maimon <tmaimon77@gmail.com>,
	Tali Perry <tali.perry1@gmail.com>,
	Patrick Venture <venture@google.com>,
	Nancy Yuen <yuenn@google.com>,
	Benjamin Fair <benjaminfair@google.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	linux-stm32@st-md-mailman.stormreply.com, soc@kernel.org,
	devicetree@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RESEND PATCH] arm64: dts: tegra: Fix boolean properties with values
Date: Tue, 12 Apr 2022 11:05:15 +0200	[thread overview]
Message-ID: <YlVAy95eF/9b1nmu@orome> (raw)
In-Reply-To: <Yk3nShkFzNJaI3/Z@robh.at.kernel.org>

[-- Attachment #1: Type: text/plain, Size: 2156 bytes --]

On Wed, Apr 06, 2022 at 02:17:30PM -0500, Rob Herring wrote:
> Boolean properties in DT are present or not present and don't take a value.
> A property such as 'foo = <0>;' evaluated to true. IOW, the value doesn't
> matter.
> 
> It may have been intended that 0 values are false, but there is no change
> in behavior with this patch.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> Can someone apply this for 5.18.
> 
>  arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi            | 8 ++++----
>  .../boot/dts/nvidia/tegra186-p3509-0000+p3636-0001.dts    | 8 ++++----
>  arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi            | 6 +++---
>  arch/arm64/boot/dts/nvidia/tegra194-p3668.dtsi            | 6 +++---
>  arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi            | 6 +++---
>  arch/arm64/boot/dts/nvidia/tegra210-p2894.dtsi            | 8 ++++----
>  arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts        | 8 ++++----
>  arch/arm64/boot/dts/nvidia/tegra210-smaug.dts             | 4 ++--
>  8 files changed, 27 insertions(+), 27 deletions(-)

This causes multiple regressions on Tegra boards. The reason for this is
that these properties are not in fact boolean, despite what the DT
bindings say. If you look at the code that handles these, you'll notice
that they are single-cell properties, typically with <0> and <1> values.
What may have led to the conclusion that these are boolean is that there
is also a special case where these can be left out, but the meaning of
that is not the "false" (<0>) value. Instead, leaving these out means
that the values should be left at whatever is currently in the register.

See pinconf_generic_parse_dt_config() and parse_dt_cfg() specifically in
drivers/pinctrl/pinconf-generic.c.

Arnd, can you please revert this so that these boards can be unbroken?

It's a bit unfortunate because there seem to be other platforms that
also employ these in the boolean form that Rob mentioned, but I think it
is those that probably need fixing instead. Not sure what the intentions
were for those.

Adding Bjorn for MSM, the Nuvoton and STM32 folks.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-04-12 10:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-06 19:17 [RESEND PATCH] arm64: dts: tegra: Fix boolean properties with values Rob Herring
2022-04-12  9:05 ` Thierry Reding [this message]
2022-04-25 11:20   ` Jon Hunter
2022-04-25 11:55     ` Arnd Bergmann
2022-04-29 15:18   ` Rob Herring

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=YlVAy95eF/9b1nmu@orome \
    --to=thierry.reding@gmail.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=arnd@arndb.de \
    --cc=avifishman70@gmail.com \
    --cc=benjaminfair@google.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=robh@kernel.org \
    --cc=soc@kernel.org \
    --cc=tali.perry1@gmail.com \
    --cc=tmaimon77@gmail.com \
    --cc=venture@google.com \
    --cc=yuenn@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).