Message ID | 20230609121044.586214-1-alexander.stein@ew.tq-group.com |
---|---|
State | Changes Requested, archived |
Headers | show |
Series | [1/1] dt-bindings: gpio: gpio-vf610: Add parsing of hogs | expand |
Context | Check | Description |
---|---|---|
robh/checkpatch | success | |
robh/patch-applied | success | |
robh/dtbs-check | warning | build log |
robh/dt-meta-schema | success |
On 09/06/2023 14:10, Alexander Stein wrote: > Allow parsing GPIO controller children nodes with GPIO hogs. > > Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> > --- > This implements the same as commit dfb49cc231a48 ("dt-bindings: gpio: > fsl-imx-gpio: Add parsing of hogs") and reuses the commit message as > well. > But it was suboptimal. Do it like in commit 6c19974d1e83 ("dt-bindings: gpio: Convert STMPE GPIO to YAML schema"), including also narrower pattern. Best regards, Krzysztof
Am Freitag, 9. Juni 2023, 14:15:53 CEST schrieb Krzysztof Kozlowski: > On 09/06/2023 14:10, Alexander Stein wrote: > > Allow parsing GPIO controller children nodes with GPIO hogs. > > > > Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> > > --- > > This implements the same as commit dfb49cc231a48 ("dt-bindings: gpio: > > fsl-imx-gpio: Add parsing of hogs") and reuses the commit message as > > well. > > But it was suboptimal. Do it like in commit 6c19974d1e83 ("dt-bindings: > gpio: Convert STMPE GPIO to YAML schema"), including also narrower pattern. Ah, thanks. I wasn't aware it is part of generic dt-schema. Regarding the narrower pattern: dt-schema still uses the wider one. Is this still correct or something which needs to be fixed? Best regards, Alexander > Best regards, > Krzysztof
On 09/06/2023 14:27, Alexander Stein wrote: > Am Freitag, 9. Juni 2023, 14:15:53 CEST schrieb Krzysztof Kozlowski: >> On 09/06/2023 14:10, Alexander Stein wrote: >>> Allow parsing GPIO controller children nodes with GPIO hogs. >>> >>> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> >>> --- >>> This implements the same as commit dfb49cc231a48 ("dt-bindings: gpio: >>> fsl-imx-gpio: Add parsing of hogs") and reuses the commit message as >>> well. >> >> But it was suboptimal. Do it like in commit 6c19974d1e83 ("dt-bindings: >> gpio: Convert STMPE GPIO to YAML schema"), including also narrower pattern. > > Ah, thanks. I wasn't aware it is part of generic dt-schema. > Regarding the narrower pattern: dt-schema still uses the wider one. Is this > still correct or something which needs to be fixed? dtschema must have wider pattern as it covers everything, all boards. If existing DTS fits narrower pattern, make it narrower. It helps keeping code consistent thus easier to read. Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml b/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml index d2c39dba56add..41b4bb1bca11d 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml +++ b/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml @@ -61,6 +61,23 @@ properties: gpio-ranges: maxItems: 1 +patternProperties: + "^(hog-[0-9]+|.+-hog(-[0-9]+)?)$": + type: object + properties: + gpio-hog: true + gpios: true + input: true + output-high: true + output-low: true + line-name: true + + required: + - gpio-hog + - gpios + + additionalProperties: false + required: - compatible - reg
Allow parsing GPIO controller children nodes with GPIO hogs. Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> --- This implements the same as commit dfb49cc231a48 ("dt-bindings: gpio: fsl-imx-gpio: Add parsing of hogs") and reuses the commit message as well. .../devicetree/bindings/gpio/gpio-vf610.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)