Skip to content

Commit 5d0e969

Browse files
committed
dt-bindings: thermal: Fix false warning with 'phandle' in trips nodes
A pattern property matching essentially anything doesn't work if there are implicit properties such as 'phandle' which can occur on any node. One such example popped up recently: arch/arm64/boot/dts/qcom/sm8650-hdk.dtb: thermal-zones: gpuss0-thermal:trips:phandle: 531 is not of type 'object' from schema $id: http://devicetree.org/schemas/thermal/thermal-zones.yaml Instead of a pattern property, use an "additionalProperties" schema instead which is the fallback in case of no matching property. Link: https://patch.msgid.link/20260410223601.1487473-2-robh@kernel.org Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
1 parent 07fd339 commit 5d0e969

1 file changed

Lines changed: 54 additions & 57 deletions

File tree

Documentation/devicetree/bindings/thermal/thermal-zones.yaml

Lines changed: 54 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -129,63 +129,60 @@ patternProperties:
129129
which the thermal framework needs to take action. The actions to
130130
be taken are defined in another node called cooling-maps.
131131

132-
patternProperties:
133-
"^[a-zA-Z][a-zA-Z0-9\\-_]{0,63}$":
134-
type: object
135-
136-
properties:
137-
temperature:
138-
$ref: /schemas/types.yaml#/definitions/int32
139-
minimum: -273000
140-
maximum: 200000
141-
description:
142-
An integer expressing the trip temperature in millicelsius.
143-
144-
hysteresis:
145-
$ref: /schemas/types.yaml#/definitions/uint32
146-
description:
147-
An unsigned integer expressing the hysteresis delta with
148-
respect to the trip temperature property above, also in
149-
millicelsius. Any cooling action initiated by the framework is
150-
maintained until the temperature falls below
151-
(trip temperature - hysteresis). This potentially prevents a
152-
situation where the trip gets constantly triggered soon after
153-
cooling action is removed.
154-
155-
type:
156-
$ref: /schemas/types.yaml#/definitions/string
157-
enum:
158-
- active # enable active cooling e.g. fans
159-
- passive # enable passive cooling e.g. throttling cpu
160-
- hot # send notification to driver
161-
- critical # send notification to driver, trigger shutdown
162-
description: |
163-
There are four valid trip types: active, passive, hot,
164-
critical.
165-
166-
The critical trip type is used to set the maximum
167-
temperature threshold above which the HW becomes
168-
unstable and underlying firmware might even trigger a
169-
reboot. Hitting the critical threshold triggers a system
170-
shutdown.
171-
172-
The hot trip type can be used to send a notification to
173-
the thermal driver (if a .notify callback is registered).
174-
The action to be taken is left to the driver.
175-
176-
The passive trip type can be used to slow down HW e.g. run
177-
the CPU, GPU, bus at a lower frequency.
178-
179-
The active trip type can be used to control other HW to
180-
help in cooling e.g. fans can be sped up or slowed down
181-
182-
required:
183-
- temperature
184-
- hysteresis
185-
- type
186-
additionalProperties: false
187-
188-
additionalProperties: false
132+
additionalProperties:
133+
type: object
134+
additionalProperties: false
135+
136+
properties:
137+
temperature:
138+
$ref: /schemas/types.yaml#/definitions/int32
139+
minimum: -273000
140+
maximum: 200000
141+
description:
142+
An integer expressing the trip temperature in millicelsius.
143+
144+
hysteresis:
145+
$ref: /schemas/types.yaml#/definitions/uint32
146+
description:
147+
An unsigned integer expressing the hysteresis delta with
148+
respect to the trip temperature property above, also in
149+
millicelsius. Any cooling action initiated by the framework is
150+
maintained until the temperature falls below
151+
(trip temperature - hysteresis). This potentially prevents a
152+
situation where the trip gets constantly triggered soon after
153+
cooling action is removed.
154+
155+
type:
156+
$ref: /schemas/types.yaml#/definitions/string
157+
enum:
158+
- active # enable active cooling e.g. fans
159+
- passive # enable passive cooling e.g. throttling cpu
160+
- hot # send notification to driver
161+
- critical # send notification to driver, trigger shutdown
162+
description: |
163+
There are four valid trip types: active, passive, hot,
164+
critical.
165+
166+
The critical trip type is used to set the maximum
167+
temperature threshold above which the HW becomes
168+
unstable and underlying firmware might even trigger a
169+
reboot. Hitting the critical threshold triggers a system
170+
shutdown.
171+
172+
The hot trip type can be used to send a notification to
173+
the thermal driver (if a .notify callback is registered).
174+
The action to be taken is left to the driver.
175+
176+
The passive trip type can be used to slow down HW e.g. run
177+
the CPU, GPU, bus at a lower frequency.
178+
179+
The active trip type can be used to control other HW to
180+
help in cooling e.g. fans can be sped up or slowed down
181+
182+
required:
183+
- temperature
184+
- hysteresis
185+
- type
189186

190187
cooling-maps:
191188
type: object

0 commit comments

Comments
 (0)