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 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 ;-)

> > Marzen has 4 keys split in two keyboards due to hardware limitations,
> > hence I had called them "keyboard-irq" (using falling edge interrupts,
> > i.e. no real key-up events)  and "keyboard-gpio" (gpio polling
> > without interrupts).
> keyboard-0
> keyboard-1

OK, will do.

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]     [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