summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/regulator
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2024-02-24 03:07:51 +0300
committerMark Brown <broonie@kernel.org>2024-02-26 16:47:05 +0300
commitefe9a6da2292e68d45cd9e0eb1c31b85841d0c2a (patch)
tree6b34ebccf395bbe200cc1410d097487a739daea6 /Documentation/devicetree/bindings/regulator
parentb9262cc1b988cdaf9bb5c2a4411d4ad4e7128e8d (diff)
downloadlinux-efe9a6da2292e68d45cd9e0eb1c31b85841d0c2a.tar.xz
regulator: dt-bindings: gpio-regulator: Fix "gpios-states" and "states" array bounds
The minimum number of array entries for "gpios-states" was not not specified, so the the default is the same as the max (8). The minimum is also missing from "states", and the maximum is also wrong as it should be 2^(# of GPIO lines). Since there can be 1 to 8 GPIOs, the "states" range should be 2 to 256. Signed-off-by: Rob Herring <robh@kernel.org> Link: https://msgid.link/r/20240224000752.3830665-1-robh@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'Documentation/devicetree/bindings/regulator')
-rw-r--r--Documentation/devicetree/bindings/regulator/gpio-regulator.yaml4
1 files changed, 3 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/regulator/gpio-regulator.yaml b/Documentation/devicetree/bindings/regulator/gpio-regulator.yaml
index f4c1f36e52e9..a34e85754658 100644
--- a/Documentation/devicetree/bindings/regulator/gpio-regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/gpio-regulator.yaml
@@ -47,6 +47,7 @@ properties:
1: HIGH
Default is LOW if nothing else is specified.
$ref: /schemas/types.yaml#/definitions/uint32-array
+ minItems: 1
maxItems: 8
items:
enum: [0, 1]
@@ -57,7 +58,8 @@ properties:
regulator and matching GPIO configurations to achieve them. If there are
no states in the "states" array, use a fixed regulator instead.
$ref: /schemas/types.yaml#/definitions/uint32-matrix
- maxItems: 8
+ minItems: 2
+ maxItems: 256
items:
items:
- description: Voltage in microvolts