Re: [hwmon-next PATCH v3 1/4] dt-bindings: hwmon: adi,adt7470
From: Guenter Roeck
Date: Thu Jul 30 2026 - 17:37:14 EST
On 7/30/26 14:11, Luiz Angelo Daros de Luca wrote:
the architecture, while I looked at the `emc2305` approach,
delegating the actual fan management to the time-proven `pwm-fan`
driver allows us to avoid reinventing the wheel (like cooling device
registration and state management) inside the adt7470 driver. It also
keeps the standard PWM consumer/provider relationship clear in the DT.
It still feels strange that emc2305 declares #pwm-cells and its
subdriver fans pwm properties and they do not work as a pwm
controller. Other drivers, like aspeed-g6-pwm-tach (with similar
That is your opinion. #pwm-cells and pwms exists because it is mandated
by DT maintainers for configuring pwm properties. That does not have to
reflect the implementation: DT property guidance explicitly states
that properties must describe the hardware, not the implementation.
There is no mandate how to implement a specific driver (such as a fan
controller driver) because a specific binding exists. It is perfectly
valid to describe pwm properties of a fan controller using #pwm-cells
and pwms without modeling it as pwm controller (which actually mandates
support of the pwm subsystem or no good reason other than "because").
While you may consider the emc2305 approach inferior, I happen to
disagree. That is your personal opinion. For my part I consider it
inferior and overly complex having to involve another subsystem (pwm)
and another driver (pwm-fan) just to make the chip's pwm outputs
visible to the thermal subsystem as cooling devices.
Guenter