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]

 



Hi Krzysztof,

On Tue, Oct 24, 2023 at 11:15 AM Krzysztof Kozlowski
<krzysztof.kozlowski@xxxxxxxxxx> wrote:
> On 24/10/2023 09:39, Geert Uytterhoeven wrote:
> > On Tue, Oct 24, 2023 at 9:33 AM Krzysztof Kozlowski
> > <krzysztof.kozlowski@xxxxxxxxxx> wrote:
> >> On 23/10/2023 20:08, Geert Uytterhoeven wrote:
> >>> On Mon, Oct 23, 2023 at 5:24 PM Krzysztof Kozlowski
> >>> <krzysztof.kozlowski@xxxxxxxxxx> wrote:
> >>>> 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".
> >>>
> >>> Most call it "keyboard".
> >>
> >> Most? My grep counted only 14.
> >>
> >> 520 for gpio-keys (not counting -polled)
> >>
> >> But sure, can be keyboard.
> >
> > Sorry, I meant Section 2.2.2 "Generic Names Recommendation" in
> > the Devicetree Specification ;-)
>
> Yes, that's right. Keyboard is generic thus indeed seems more suitable,
> because "gpio-keys" already includes specific part - GPIO. OTOH, we tend
> to think about keyboard as something with keys for the full alphabet,
> like PC 10x keyboard. How to call a node in an embedded board or phone
> with 4 buttons or 4 keys in total?

On hackaday.com, they would call that a keypad.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[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