Re: [PATCH v2 1/6] dt-bindings: hwmon: add binding for adi,adt7470

Guenter Roeck <[email protected]> Mon, 20 Jul 2026 07:24:11 -0700
Newsgroups org.kernel.vger.linux-pwm,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-hwmon,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On 7/19/26 23:47, Krzysztof Kozlowski wrote:
> On Fri, Jul 17, 2026 at 05:59:14PM -0300, Luiz Angelo Daros de Luca wrote:
>> The Analog Devices ADT7470 is a temperature monitor and PWM fan
>> controller. It supports up to 10 external temperature sensors and
>> up to 4 PWM fan outputs.
> 
> A nit, subject: drop second/last, redundant "binding for". The
> "dt-bindings" prefix is already stating that these are bindings.
> See also:
> https://elixir.bootlin.com/linux/v7.1-rc7/source/Documentation/devicetree/bindings/submitting-patches.rst#L23
> 
>>
>> Add the YAML device tree binding documentation for it. This includes
> 
> s/YAML//
> There is no YAML in Devicetree.
> 
>> support for the thermal framework by defining the "#thermal-sensor-cells"
>> property, and support for the PWM subsystem by defining the "#pwm-cells"
>> property.
>>
>> Signed-off-by: Luiz Angelo Daros de Luca <[email protected]>
>> ---
>>   .../devicetree/bindings/hwmon/adi,adt7470.yaml     | 62 ++++++++++++++++++++++
>>   1 file changed, 62 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/hwmon/adi,adt7470.yaml b/Documentation/devicetree/bindings/hwmon/adi,adt7470.yaml
>> new file mode 100644
>> index 000000000000..14bb6359c91f
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/hwmon/adi,adt7470.yaml
>> @@ -0,0 +1,62 @@
>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/hwmon/adi,adt7470.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Analog Devices ADT7470 hwmon sensor
>> +
>> +maintainers:
>> +  - Luiz Angelo Daros de Luca <[email protected]>
>> +
>> +description: |
> 
> Do not need '|' unless you need to preserve formatting.
> 
>> +  The ADT7470 is a temperature monitor and multiple PWM outputs.
>> +  It supports monitoring up to 10 external temperature sensors and controlling
>> +  up to four fans.
> 
> "controling fans" is confusing and suggests this is a fan controller, so
> you would need to reference proper schema for that. It is just PWM
> output, no? PWM output could also go to LEDs or motors (well, fan is a
> motor).
> 
 From the datasheet: "The ADT74701 controller is a multichannel
temperature sensor and PWM fan controller and fan speed monitor".

It is a fan controller which happens to use pwm signals to control
fan speeds. It is not a PWM controller, and its pwm outputs are not
intended to be used for anything but controlling fan speeds.

Technically it is _possible_ to use the pwm outputs to control
something else. But that does not mean that chip is a pwm controller.
It is still a fan controller. I don't mind modeling outputs as
non-fan-control pwm channels if that is what they are used for,
but that must be clearly distinguished in both the driver code
and the bindings.

Guenter