Re: [PATCH 1/2] of: add support for value "false" to of_property_read_bool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 12.11.24 um 08:41 schrieb Josua Mayer:
> 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 includes,
> /delete-property/ is recommend. This however does not work in overlays
> (addons).
>
> Several places use string "true" ([1], [2], [3]) and one uses string
> "false" ([1]). This suggests that at some point the value of a type
> string property was to be taken into account during evaluation.
>
> Change of_property_read_bool to only return true if a property is both
> present, and not equal "false".
>
> Existing usage in drivers/of and include/linux/of.h are updated
> accordingly.
> Other places should be reviewed as needed wrt. changed semantics.
>
> [1] Documentation/devicetree/bindings/sound/rt5651.txt
> [2] Documentation/devicetree/bindings/sound/pcm3060.txt
> [3] arch/arm/boot/dts/ti/omap/am335x-baltos.dtsi
>
> Signed-off-by: Josua Mayer <josua@xxxxxxxxxxxxx>
> ---
Please note this patch-set has only been tested to compile,
I do not consider it ready for current merge window.

I would however appreciate comments.





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux