mbox series

[0/3] hwmon: add Microchip EMC230X fan controller driver

Message ID 20220914053030.8929-1-matt@traverse.com.au (mailing list archive)
Headers show
Series hwmon: add Microchip EMC230X fan controller driver | expand

Message

Mathew McBride Sept. 14, 2022, 5:30 a.m. UTC
The Microchip EMC230X (formerly made by SMSC) family of fan controllers
provide PWM control for up to 5 fans (in the EMC2305). The EMC230X is
capable of maintaining (closed-loop) a target RPM speed through PWM.

This driver has been tested with the EMC2301 (on our Traverse Ten64
appliance) and with the EMC2305 demo board (ADM00879).

The driver is by no means complete, for example, further work would
be required to support the different PWM output frequencies for
voltage-based fan speed control. (So far this driver has only been
tested with direct PWM capable fans, like the 4 pin fans found
in recent PCs)

The emc230x driver also has thermal subsystem integration which allows
the emc230x-controlled fan(s) to be used as cooling devices.

Mathew McBride (3):
  hwmon: (emc230x) add Microchip (SMSC) EMC230X fan controller support
  dt-bindings: add binding for Microchip EMC230X fan controller family
  arm64: dts: ten64: add configuration for fan controller

 .../bindings/hwmon/microchip,emc2301.yaml     |  83 +++
 MAINTAINERS                                   |   7 +
 .../boot/dts/freescale/fsl-ls1088a-ten64.dts  |  43 ++
 drivers/hwmon/Kconfig                         |  13 +
 drivers/hwmon/Makefile                        |   1 +
 drivers/hwmon/emc230x.c                       | 587 ++++++++++++++++++
 6 files changed, 734 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/microchip,emc2301.yaml
 create mode 100644 drivers/hwmon/emc230x.c

Comments

Guenter Roeck Sept. 14, 2022, 10:12 a.m. UTC | #1
On Wed, Sep 14, 2022 at 05:30:27AM +0000, Mathew McBride wrote:
> The Microchip EMC230X (formerly made by SMSC) family of fan controllers
> provide PWM control for up to 5 fans (in the EMC2305). The EMC230X is
> capable of maintaining (closed-loop) a target RPM speed through PWM.
> 
> This driver has been tested with the EMC2301 (on our Traverse Ten64
> appliance) and with the EMC2305 demo board (ADM00879).
> 
> The driver is by no means complete, for example, further work would
> be required to support the different PWM output frequencies for
> voltage-based fan speed control. (So far this driver has only been
> tested with direct PWM capable fans, like the 4 pin fans found
> in recent PCs)
> 
> The emc230x driver also has thermal subsystem integration which allows
> the emc230x-controlled fan(s) to be used as cooling devices.

I just accepted a driver or emc2301/2/3/5. Please submit improvements
on top of that driver if needed; we won't have competing drivers
for the same chip in the kernel, and replacing a just accepted driver
smply does not make any sense.

Guenter
Mathew McBride Sept. 14, 2022, 10:24 a.m. UTC | #2
On Wed, Sep 14, 2022, at 8:12 PM, Guenter Roeck wrote:
> On Wed, Sep 14, 2022 at 05:30:27AM +0000, Mathew McBride wrote:
> > The Microchip EMC230X (formerly made by SMSC) family of fan controllers
> > provide PWM control for up to 5 fans (in the EMC2305). The EMC230X is
> > capable of maintaining (closed-loop) a target RPM speed through PWM.
> > 
> > This driver has been tested with the EMC2301 (on our Traverse Ten64
> > appliance) and with the EMC2305 demo board (ADM00879).
> > 
> > The driver is by no means complete, for example, further work would
> > be required to support the different PWM output frequencies for
> > voltage-based fan speed control. (So far this driver has only been
> > tested with direct PWM capable fans, like the 4 pin fans found
> > in recent PCs)
> > 
> > The emc230x driver also has thermal subsystem integration which allows
> > the emc230x-controlled fan(s) to be used as cooling devices.
> 
> I just accepted a driver or emc2301/2/3/5. Please submit improvements
> on top of that driver if needed; we won't have competing drivers
> for the same chip in the kernel, and replacing a just accepted driver
> smply does not make any sense.

My apologies, I was unaware of the separate effort! 
Mine has been out of tree for a long time and I finally had time to work on it recently.

There are several changes I can see that need to be made to the accepted one to work for our usecase.

> Guenter
>