Skip to content

Commit

Permalink
dt-bindings: power: reset: Convert mode-.* properties to array
Browse files Browse the repository at this point in the history
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) <robh@kernel.org>
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Link: https://lore.kernel.org/r/20241107-arm-psci-system_reset2-vendor-reboots-v8-1-e8715fa65cb5@quicinc.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
  • Loading branch information
Elliot Berman authored and Sebastian Reichel committed Nov 11, 2024
1 parent f29cc6d commit 05d9044
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ properties:
allOf:
- $ref: reboot-mode.yaml#

patternProperties:
"^mode-.*$":
maxItems: 1

required:
- compatible
- nvmem-cells
Expand Down
7 changes: 7 additions & 0 deletions Documentation/devicetree/bindings/power/reset/qcom,pon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ required:
- compatible
- reg

patternProperties:
"^mode-.*$":
maxItems: 1

unevaluatedProperties: false

allOf:
Expand All @@ -75,6 +79,9 @@ allOf:
reg-names:
items:
- const: pon
else:
patternProperties:
"^mode-.*$": false

# Special case for pm8941, which doesn't store reset mode
- if:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ description: |
properties:
mode-normal:
$ref: /schemas/types.yaml#/definitions/uint32
$ref: /schemas/types.yaml#/definitions/uint32-array
description:
Default value to set on a reboot if no command was provided.

patternProperties:
"^mode-.*$":
$ref: /schemas/types.yaml#/definitions/uint32
$ref: /schemas/types.yaml#/definitions/uint32-array

additionalProperties: true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ properties:
allOf:
- $ref: reboot-mode.yaml#

patternProperties:
"^mode-.*$":
maxItems: 1

unevaluatedProperties: false

required:
Expand Down

0 comments on commit 05d9044

Please sign in to comment.