Commit a0c479bf authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Bartosz Golaszewski
Browse files

dt-bindings: gpio: simplify GPIO hog nodes schema



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.

Reviewed-by: default avatarRob Herring (Arm) <robh@kernel.org>
Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240828-dt-bindings-gpio-hog-v1-3-63b83e47d804@linaro.org


Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
parent 0cbda049
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -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
+0 −11
Original line number Diff line number Diff line
@@ -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
+0 −11
Original line number Diff line number Diff line
@@ -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
+0 −12
Original line number Diff line number Diff line
@@ -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:
+0 −11
Original line number Diff line number Diff line
@@ -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