On Tue, Sep 27, 2022 at 6:56 AM Peter Maydell <peter.mayd...@linaro.org> wrote: > > On Tue, 27 Sept 2022 at 11:12, Jean-Philippe Brucker > <jean-phili...@linaro.org> wrote: > > The node name of the gpio-key devicetree node should be "key-poweroff": > > > > gpio-keys: 'poweroff' does not match any of the regexes: > > '^(button|event|key|switch|(button|event|key|switch)-[a-z0-9-]+|[a-z0-9-]+-(button|event|key|switch))$', > > 'pinctrl-[0-9]+' > > From schema: linux/Documentation/devicetree/bindings/input/gpio-keys.yaml > > > > Signed-off-by: Jean-Philippe Brucker <jean-phili...@linaro.org> > > This restriction only went into the DT documentation in July > (kernel commit 5eb5652250).
Fair enough. > Please don't retrospectively make perfectly valid working DTs > non-valid. I don't see any reason to change QEMU here. > > More generally, the set of things you might want the > validator to warn about for a fresh new human-written DTB > doesn't necessarily correspond to the set of things you want > to enforce for a pre-existing code-generated DTB. For the > former it makes much more sense to impose "coding style" > and "naming convention" type rules. I too would like to distinguish that, but haven't come up with a way to do that in json-schema yet. The way schemas are applied independently makes that a challenge. So far it's been low on the priority list as any platforms with few enough warnings to get to 0 haven't been a problem to fix (in a few cases we do end up relaxing the schemas). On the flip side, even existing things eventually get updated for coding style or evolving conventions. As long as we don't break ABIs, the same should apply to DT. Rob