Re: [PATCH dt-schema] schemas: gpio: gpio-consumer: Fix false positives on nodes named gpio

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

 



On 23/10/2023 16:41, Geert Uytterhoeven wrote:
> Just like for "gpio", nodes can be named "gpios" or
> "<something>-gpio(s)", causing false positive failures.
> 
> See also commit 80120fccde170902 ("schemas: gpio: fix false positive
> failures on nodes named 'gpio'").
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> ---
> Seen on Linux, e.g.:
> 
>     arch/arm/boot/dts/renesas/r8a7779-marzen.dtb: /: keyboard-gpio: {'compatible': ['gpio-keys-polled'], 'poll-interval': [[50]], 'pinctrl-0': [[29]], 'pinctrl-names': ['default'], 'key-3': {'gpios': [[28, 19, 1]], 'linux,code': [[4]], 'label': ['SW1-3'], 'debounce-interval': [[20]]}, 'key-4': {'gpios': [[28, 20, 1]], 'linux,code': [[5]], 'label': ['SW1-4'], 'debounce-interval': [[20]]}} is not of type 'array'
> 	    from schema $id: http://devicetree.org/schemas/gpio/gpio-consumer.yaml#
>     arch/arm/boot/dts/renesas/r8a7779-marzen.dtb: pinctrl@fffc0000: keyboard-gpio: {'pins': ['GP_0_19', 'GP_0_20'], 'bias-pull-up': True, 'phandle': [[29]]} is not of type 'array'
> 	    from schema $id: http://devicetree.org/schemas/gpio/gpio-consumer.yaml#

keyboard-gpio is not commonly used names. Most (almost all) boards just
call it "gpio-keys".

> 
>     arch/arm/boot/dts/microchip/at91-kizbox3-hs.dtb: /: gpios: {'compatible': ['gpio'], 'status': ['okay'], 'rf_on': {'label': ['rf on'], 'gpio': [[38, 83, 0]], 'output': True, 'init-low': True}, 'wifi_on': {'label': ['wifi on'], 'gpio': [[38, 84, 0]], 'output': True, 'init-low': True}, 'zbe_test_radio': {'label': ['zbe test radio'], 'gpio': [[38, 53, 0]], 'output': True, 'init-low': True}, 'zbe_rst': {'label': ['zbe rst'], 'gpio': [[38, 57, 0]], 'output': True, 'init-low': True}, 'io_reset': {'label': ['io reset'], 'gpio': [[38, 62, 0]], 'output': True, 'init-low': True}, 'io_test_radio': {'label': ['io test radio'], 'gpio': [[38, 73, 0]], 'output': True, 'init-low': True}, 'io_boot_0': {'label': ['io boot 0'], 'gpio': [[38, 75, 0]], 'output': True, 'init-low': True}, 'io_boot_1': {'label': ['io boot 1'], 'gpio': [[38, 81, 0]], 'output': True, 'init-low': True}, 'verbose_bootloader': {'label': ['verbose bootloader'], 'gpio': [[38, 43, 0]], 'input': True}, 'nail_bed_detection': {'label': ['nail bed detection'], 'gpio': [[38, 44, 0]], 'input': True}, 'id_usba': {'label': ['id usba'], 'gpio': [[38, 64, 1]], 'input': True}} is not of type 'array'
> 	    from schema $id: http://devicetree.org/schemas/gpio/gpio-consumer.yaml#

compatible = "gpio"? Is there such binding?

I think we should not allow "gpios" as a node, at least above examples
do not justify it.

> 
> For marzen, the alternative fix would be to
> s/keyboard-gpio/keyboard-polled/g.
> ---



Best regards,
Krzysztof





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux