[PATCH 1/2] dt-bindings: hwmon: pwm-fan: Reference the common fan schema
From: Igor Velkov via B4 Relay
Date: Sun Oct 18 2026 - 00:55:33 EST
From: Igor Velkov <iav@xxxxxx>
pwm-fan predates fan-common.yaml and repeats several of its properties.
Reference the common schema, drop the duplicated properties and keep
only the constraints specific to PWM fans.
This also allows label, which the hwmon core exposes as the label
attribute.
Link: https://lore.kernel.org/r/20250106173805.GA501301-robh@xxxxxxxxxx
Assisted-by: LLM
Signed-off-by: Igor Velkov <iav@xxxxxx>
---
.../devicetree/bindings/hwmon/pwm-fan.yaml | 22 +++++-----------------
1 file changed, 5 insertions(+), 17 deletions(-)
diff --git a/Documentation/devicetree/bindings/hwmon/pwm-fan.yaml b/Documentation/devicetree/bindings/hwmon/pwm-fan.yaml
index 6a24851fd80d..b5407ed52976 100644
--- a/Documentation/devicetree/bindings/hwmon/pwm-fan.yaml
+++ b/Documentation/devicetree/bindings/hwmon/pwm-fan.yaml
@@ -10,19 +10,18 @@ maintainers:
- Jean Delvare <jdelvare@xxxxxxxx>
- Guenter Roeck <linux@xxxxxxxxxxxx>
+allOf:
+ - $ref: fan-common.yaml#
+
properties:
compatible:
const: pwm-fan
cooling-levels:
description: PWM duty cycle values corresponding to thermal cooling states.
- $ref: /schemas/types.yaml#/definitions/uint32-array
items:
maximum: 255
- fan-supply:
- description: Phandle to the regulator that provides power to the fan.
-
interrupts:
description:
This contains an interrupt specifier for each fan tachometer output
@@ -51,26 +50,14 @@ properties:
Time to wait in microseconds after start when stopped.
pulses-per-revolution:
- description:
- Define the number of pulses per fan revolution for each tachometer
- input as an integer.
- $ref: /schemas/types.yaml#/definitions/uint32
minimum: 1
- maximum: 4
default: 2
- pwms:
- description: The PWM that is used to control the fan.
- maxItems: 1
-
- "#cooling-cells":
- const: 2
-
required:
- compatible
- pwms
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
@@ -114,4 +101,5 @@ examples:
interrupt-parent = <&gpio5>;
interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
pulses-per-revolution = <2>;
+ label = "CPU fan";
};
--
2.43.0