mbox series

[0/3] dt-bindings: gpio/pinctrl: add missing type to GPIO hogs

Message ID 20240828-dt-bindings-gpio-hog-v1-0-63b83e47d804@linaro.org
Headers show
Series dt-bindings: gpio/pinctrl: add missing type to GPIO hogs | expand

Message

Krzysztof Kozlowski Aug. 28, 2024, 9:35 a.m. UTC
Merging
=======
Patches are independent and can go via different trees.

Description
===========
DTS like:

    device {
        compatible = "fcs,fxl6408";
        dummy-hog;
    };

should fail, but unfortunately it does not if "type: object" is missing.
Add missing type, so this will properly trigger warning:

    dummy-hog: True is not of type 'object'

Best regards,
Krzysztof

---
Krzysztof Kozlowski (3):
      dt-bindings: gpio: fcs,fxl6408: add missing type to GPIO hogs
      dt-bindings: pinctrl: qcom: add missing type to GPIO hogs
      dt-bindings: gpio: simplify GPIO hog nodes schema

 .../devicetree/bindings/gpio/fairchild,74hc595.yaml          | 11 -----------
 Documentation/devicetree/bindings/gpio/fcs,fxl6408.yaml      |  1 +
 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 -----------
 .../devicetree/bindings/pinctrl/qcom,ipq4019-pinctrl.yaml    |  1 +
 .../devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml          |  1 +
 .../devicetree/bindings/pinctrl/qcom,sdm845-pinctrl.yaml     |  1 +
 9 files changed, 4 insertions(+), 56 deletions(-)
---
base-commit: c79c85875f1af04040fe4492ed94ce37ad729c4d
change-id: 20240828-dt-bindings-gpio-hog-429a28eb94a2

Best regards,

Comments

Rob Herring (Arm) Aug. 28, 2024, 1:41 p.m. UTC | #1
On Wed, Aug 28, 2024 at 11:35:56AM +0200, Krzysztof Kozlowski wrote:
> Merging
> =======
> Patches are independent and can go via different trees.
> 
> Description
> ===========
> DTS like:
> 
>     device {
>         compatible = "fcs,fxl6408";
>         dummy-hog;
>     };
> 
> should fail, but unfortunately it does not if "type: object" is missing.
> Add missing type, so this will properly trigger warning:
> 
>     dummy-hog: True is not of type 'object'
> 
> Best regards,
> Krzysztof
> 
> ---
> Krzysztof Kozlowski (3):
>       dt-bindings: gpio: fcs,fxl6408: add missing type to GPIO hogs
>       dt-bindings: pinctrl: qcom: add missing type to GPIO hogs
>       dt-bindings: gpio: simplify GPIO hog nodes schema

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Conor Dooley Aug. 28, 2024, 3:53 p.m. UTC | #2
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.
Linus Walleij Aug. 30, 2024, 10:31 p.m. UTC | #3
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
Linus Walleij Aug. 30, 2024, 10:31 p.m. UTC | #4
On Wed, Aug 28, 2024 at 11:36 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:

> GPIO hog nodes should define type, otherwise "dummy-hog" boolean
> properties would be allowed.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij