Message ID | 20240828-dt-bindings-gpio-hog-v1-3-63b83e47d804@linaro.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | dt-bindings: gpio/pinctrl: add missing type to GPIO hogs | expand |
On Wed, Aug 28, 2024 at 11:35:59AM +0200, Krzysztof Kozlowski wrote: > The core schema in dtschema already strictly defines contents of nodes > with "gpio-hog" property (with additionalProperties: false), thus the > only thing device schema should do is: define "type: object" and > required "gpio-hog". Make the code a bit simpler by removing redundant > parts. > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > --- > .../devicetree/bindings/gpio/fairchild,74hc595.yaml | 11 ----------- > Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml | 11 ----------- > Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml | 11 ----------- > .../devicetree/bindings/gpio/microchip,mpfs-gpio.yaml | 12 ------------ Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Cheers, Conor.
On Wed, Aug 28, 2024 at 11:36 AM Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > The core schema in dtschema already strictly defines contents of nodes > with "gpio-hog" property (with additionalProperties: false), thus the > only thing device schema should do is: define "type: object" and > required "gpio-hog". Make the code a bit simpler by removing redundant > parts. > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Yours, Linus Walleij
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> On Wed, 28 Aug 2024 11:35:59 +0200, Krzysztof Kozlowski wrote: > The core schema in dtschema already strictly defines contents of nodes > with "gpio-hog" property (with additionalProperties: false), thus the > only thing device schema should do is: define "type: object" and > required "gpio-hog". Make the code a bit simpler by removing redundant > parts. > > > [...] Applied, thanks! [3/3] dt-bindings: gpio: simplify GPIO hog nodes schema commit: 98db29d1b4b7b1fe9b54d11e66a396fc37a73c57 Best regards,
diff --git a/Documentation/devicetree/bindings/gpio/fairchild,74hc595.yaml b/Documentation/devicetree/bindings/gpio/fairchild,74hc595.yaml index c0ad70e66f76..e8bc9f018edb 100644 --- a/Documentation/devicetree/bindings/gpio/fairchild,74hc595.yaml +++ b/Documentation/devicetree/bindings/gpio/fairchild,74hc595.yaml @@ -36,19 +36,8 @@ properties: patternProperties: "^(hog-[0-9]+|.+-hog(-[0-9]+)?)$": type: object - - properties: - gpio-hog: true - gpios: true - output-high: true - output-low: true - line-name: true - required: - gpio-hog - - gpios - - additionalProperties: false required: - compatible diff --git a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml index e1fc8bb6d379..6b06609c649e 100644 --- a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml +++ b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml @@ -85,19 +85,8 @@ properties: 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 diff --git a/Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml b/Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml index 51e8390d6b32..7b1eb08fa055 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml +++ b/Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml @@ -107,19 +107,8 @@ properties: 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 diff --git a/Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml b/Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml index d61569b3f15b..d78da7dd2a56 100644 --- a/Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml +++ b/Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml @@ -49,20 +49,8 @@ properties: patternProperties: "^.+-hog(-[0-9]+)?$": type: object - - additionalProperties: false - - properties: - gpio-hog: true - gpios: true - input: true - output-high: true - output-low: true - line-name: true - required: - gpio-hog - - gpios allOf: - if: diff --git a/Documentation/devicetree/bindings/gpio/socionext,uniphier-gpio.yaml b/Documentation/devicetree/bindings/gpio/socionext,uniphier-gpio.yaml index 228fa27ffdc3..36f5a0610471 100644 --- a/Documentation/devicetree/bindings/gpio/socionext,uniphier-gpio.yaml +++ b/Documentation/devicetree/bindings/gpio/socionext,uniphier-gpio.yaml @@ -55,19 +55,8 @@ properties: patternProperties: "^.+-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
The core schema in dtschema already strictly defines contents of nodes with "gpio-hog" property (with additionalProperties: false), thus the only thing device schema should do is: define "type: object" and required "gpio-hog". Make the code a bit simpler by removing redundant parts. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> --- .../devicetree/bindings/gpio/fairchild,74hc595.yaml | 11 ----------- Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml | 11 ----------- Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml | 11 ----------- .../devicetree/bindings/gpio/microchip,mpfs-gpio.yaml | 12 ------------ .../devicetree/bindings/gpio/socionext,uniphier-gpio.yaml | 11 ----------- 5 files changed, 56 deletions(-)