Skip to content

Commit efe9a6d

Browse files
robherringbroonie
authored andcommitted
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 <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent b9262cc commit efe9a6d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Documentation/devicetree/bindings/regulator/gpio-regulator.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ properties:
4747
1: HIGH
4848
Default is LOW if nothing else is specified.
4949
$ref: /schemas/types.yaml#/definitions/uint32-array
50+
minItems: 1
5051
maxItems: 8
5152
items:
5253
enum: [0, 1]
@@ -57,7 +58,8 @@ properties:
5758
regulator and matching GPIO configurations to achieve them. If there are
5859
no states in the "states" array, use a fixed regulator instead.
5960
$ref: /schemas/types.yaml#/definitions/uint32-matrix
60-
maxItems: 8
61+
minItems: 2
62+
maxItems: 256
6163
items:
6264
items:
6365
- description: Voltage in microvolts

0 commit comments

Comments
 (0)