public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 0/2] of: add support for value "false" to of_property_read_bool
@ 2024-11-12  6:41 Josua Mayer
  2024-11-12  6:41 ` [PATCH 1/2] " Josua Mayer
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Josua Mayer @ 2024-11-12  6:41 UTC (permalink / raw)
  To: Rob Herring, Saravana Kannan, Nishanth Menon, Vignesh Raghavendra,
	Tero Kristo, Krzysztof Kozlowski, Conor Dooley
  Cc: devicetree, linux-kernel, linux-arm-kernel, Geert Uytterhoeven,
	Josua Mayer, Jon Nettleton, Yazan Shhady, rabeeh

Boolean type properties are usually considered true if present and false
when they do not exist. This works well for many in-tree board dts and
existing drivers.
    
When users need to overrride boolean values from included dts,
/delete-property/ is recommend. This however does not work in overlays
(addons).

Geert pointed out [1] that there are several invitations for using
strings "true" and "false" on boolean properties: [1], [2], [3].

Add support for a string value "false" to be considered false on boolean
properties by changing of_property_read_bool implementation.

Affected by this issue is AM642 HummingBoard-T overlay to enable usb-3.1
function. This is an alternative solution to dropping
it's disfynctional overlay [1].

[1] https://lore.kernel.org/linux-devicetree/CAMuHMdWY0J7uooeRbUGwjkeCLd2UVyN9dtDWUkg5pJ3sAULdsQ@mail.gmail.com/
[2] Documentation/devicetree/bindings/sound/rt5651.txt
[3] Documentation/devicetree/bindings/sound/pcm3060.txt
[4] arch/arm/boot/dts/ti/omap/am335x-baltos.dtsi
[5] https://lore.kernel.org/linux-devicetree/20241101-am64-hb-fix-overlay-v1-1-080b98b057b6@solid-run.com/

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Closes: https://lore.kernel.org/linux-devicetree/CAMuHMdXTgpTnJ9U7egC2XjFXXNZ5uiY1O+WxNd6LPJW5Rs5KTw@mail.gmail.com
Fixes: bbef42084cc1 ("arm64: dts: ti: hummingboard-t: add overlays for m.2 pci-e and usb-3")
Signed-off-by: Josua Mayer <josua@solid-run.com>

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Jon Nettleton <jon@solid-run.com>
Cc: Yazan Shhady <yazan.shhady@solid-run.com>
Cc: rabeeh@solid-run.com

Signed-off-by: Josua Mayer <josua@solid-run.com>
---
Josua Mayer (2):
      of: add support for value "false" to of_property_read_bool
      arm64: dts: ti: k3-am642-hummingboard-t-usb3: fix overlay boolean value

 arch/arm64/boot/dts/ti/k3-am642-hummingboard-t-usb3.dtso |  2 +-
 drivers/of/property.c                                    |  2 +-
 include/linux/of.h                                       | 13 ++++++++-----
 3 files changed, 10 insertions(+), 7 deletions(-)
---
base-commit: 9852d85ec9d492ebef56dc5f229416c925758edc
change-id: 20241112-am64-overlay-bool-60a35da933f7

Best regards,
-- 
Josua Mayer <josua@solid-run.com>



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-11-13 10:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-12  6:41 [PATCH 0/2] of: add support for value "false" to of_property_read_bool Josua Mayer
2024-11-12  6:41 ` [PATCH 1/2] " Josua Mayer
2024-11-12  6:52   ` Josua Mayer
2024-11-12  6:41 ` [PATCH 2/2] arm64: dts: ti: k3-am642-hummingboard-t-usb3: fix overlay boolean value Josua Mayer
2024-11-12 13:46 ` [PATCH 0/2] of: add support for value "false" to of_property_read_bool Rob Herring
2024-11-13  9:41   ` Josua Mayer
2024-11-13 10:15     ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox