]> git.baikalelectronics.ru Git - kernel.git/commit
dt-bindings: input: gpio-keys: enforce node names to match all properties
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tue, 5 Jul 2022 12:03:54 +0000 (14:03 +0200)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 8 Jul 2022 22:21:54 +0000 (15:21 -0700)
commit2b6a807dd561951def2c3e90a5eed93442fb584b
treed70db3fa566bfa15c51a1e6b8b1bf7ad9d75338b
parent6314fb9821a1a4a748d300f648ae7b13f1c82e9b
dt-bindings: input: gpio-keys: enforce node names to match all properties

The gpio-keys DT schema matches all properties with a wide pattern and
applies specific schema to children.  This has drawback - all regular
properties are also matched and are silently ignored, even if they are
not described in schema.  Basically this allows any non-object property
to be present.

Enforce specific naming pattern for children (keys) to narrow the
pattern thus do not match other properties.  This will require all
children to be properly prefixed or suffixed (button, event, switch or
key).

Removal of "if:" within patternProperties causes drop of one indentation
level, but there are no other changes in the affected block.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220705120356.94876-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Documentation/devicetree/bindings/input/gpio-keys.yaml