Re: [hwmon-next PATCH v6 1/4] dt-bindings: hwmon: add adi,adt7470

[email protected]
Newsgroups org.kernel.vger.linux-devicetree,org.kernel.vger.linux-hwmon
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The `#pwm-cells` property is defined but omitted from the `required` list in the device tree binding, violating subsystem guidelines for hardware with provider capabilities.
--

--- Patch [1]: [hwmon-next PATCH v6 1/4] dt-bindings: hwmon: add adi,adt7470 ---
commit fe49a8bb78dd4a0eaf6f5fcfe3003d9e2f0f9049
Author: Luiz Angelo Daros de Luca <[email protected]>

dt-bindings: hwmon: add adi,adt7470

This commit adds the device tree binding documentation for the Analog Devices
ADT7470 multichannel temperature sensor and PWM fan controller. It defines
support for the thermal framework and models fan control lines as PWM
channels.

> diff --git a/Documentation/devicetree/bindings/hwmon/adi,adt7470.yaml b/Documentation/devicetree/bindings/hwmon/adi,adt7470.yaml
> new file mode 100644
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/adi,adt7470.yaml
[ ... ]
> +properties:
> +  compatible:
> +    const: adi,adt7470
> +
> +  reg:
> +    maxItems: 1
> +
> +  "#pwm-cells":
> +    const: 3
> +
> +  "#thermal-sensor-cells":
> +    const: 1
> +    description:
> +      Valid index values are 0 to 9, corresponding to temp1 through temp10.
> +
> +required:
> +  - compatible
> +  - reg

[Severity: Medium]
Should "#pwm-cells" be included in this required list?

When a hardware variant has provider capabilities like a PWM output, the
corresponding properties are typically expected to be present in the required
list. Without it, incomplete device tree nodes lacking the "#pwm-cells"
property might pass schema validation but fail at runtime when dependent
subsystems attempt to use the device as a PWM provider.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.