Skip to content

Commit 05d9044

Browse files
eberman-quicsre
authored andcommitted
dt-bindings: power: reset: Convert mode-.* properties to array
PSCI reboot mode will map a mode name to multiple magic values instead of just one. Convert the mode-.* property to an array. Users of the reboot-mode schema will need to specify the maxItems of the mode-.* properties. Existing users will all be 1. Reviewed-by: Rob Herring (Arm) <[email protected]> Signed-off-by: Elliot Berman <[email protected]> Link: https://lore.kernel.org/r/20241107-arm-psci-system_reset2-vendor-reboots-v8-1-e8715fa65cb5@quicinc.com Signed-off-by: Sebastian Reichel <[email protected]>
1 parent f29cc6d commit 05d9044

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed

Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ properties:
3131
allOf:
3232
- $ref: reboot-mode.yaml#
3333

34+
patternProperties:
35+
"^mode-.*$":
36+
maxItems: 1
37+
3438
required:
3539
- compatible
3640
- nvmem-cells

Documentation/devicetree/bindings/power/reset/qcom,pon.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ required:
5454
- compatible
5555
- reg
5656

57+
patternProperties:
58+
"^mode-.*$":
59+
maxItems: 1
60+
5761
unevaluatedProperties: false
5862

5963
allOf:
@@ -75,6 +79,9 @@ allOf:
7579
reg-names:
7680
items:
7781
- const: pon
82+
else:
83+
patternProperties:
84+
"^mode-.*$": false
7885

7986
# Special case for pm8941, which doesn't store reset mode
8087
- if:

Documentation/devicetree/bindings/power/reset/reboot-mode.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ description: |
2828
2929
properties:
3030
mode-normal:
31-
$ref: /schemas/types.yaml#/definitions/uint32
31+
$ref: /schemas/types.yaml#/definitions/uint32-array
3232
description:
3333
Default value to set on a reboot if no command was provided.
3434

3535
patternProperties:
3636
"^mode-.*$":
37-
$ref: /schemas/types.yaml#/definitions/uint32
37+
$ref: /schemas/types.yaml#/definitions/uint32-array
3838

3939
additionalProperties: true
4040

Documentation/devicetree/bindings/power/reset/syscon-reboot-mode.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ properties:
3232
allOf:
3333
- $ref: reboot-mode.yaml#
3434

35+
patternProperties:
36+
"^mode-.*$":
37+
maxItems: 1
38+
3539
unevaluatedProperties: false
3640

3741
required:

0 commit comments

Comments
 (0)