Repository navigation
EMC2301 driver - #5026
EMC2301 driver#5026
Conversation
It is quite common for the devm_thermal_zone_of_sensor_register to need to defer, so avoid spamming the log by using dev_err_probe instead of dev_err. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
| addr = <&emc2301>,"reg:0"; | ||
| minrpm = <&emc2301>,"min-rpm;0"; | ||
| maxrpm = <&emc2301>,"max-rpm;0"; | ||
| minrpm = <&emc2301>,"emc2305,pwm-min;0"; |
There was a problem hiding this comment.
The documentation uses minpwm and maxpwm, which make more sense. But it highlights that the PWM setting is device-specific in a way that an RPM setting wouldn't be (provided the driver supports RPMs). Perhaps this would be better as a dedicated CM4 fan overlay? I don't know.
There was a problem hiding this comment.
The documentation uses minpwm and maxpwm, which make more sense
Yes replaced the docs but not the override name.
This is the downside of the emc2305 driver over the emc2301 one - PWM setting vs RPM.
Then again the RPM range is variable between any two fans. At least default PWM settings should guarantee the fan spins (the controller does give a boost if it thinks it is stalled), whereas the default speed settings won't. (eg my fan here has a range of 200 to 1800 rpm, so the defaults you had used of 3500 and 5500 rpm aren't applicable)
Submitted to linux-hwmon mailing list at https://patchwork.kernel.org/project/linux-hwmon/patch/20220430114905.53448-3-michaelsh@nvidia.com/ Add basic description of emc2305 driver device tree binding. Signed-off-by: Michael Shych <michaelsh@nvidia.com> Reviewed-by: Vadim Pasternak <vadimp@nvidia.com>
The bindings submitted to mainline had some issues, so fix them up. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
…d Controller. Submitted to linux-hwmon mailing list at https://patchwork.kernel.org/project/linux-hwmon/patch/20220430114905.53448-2-michaelsh@nvidia.com/ Add driver for Microchip EMC2301/2/3/5 RPM-based PWM Fan Speed Controller. Modify Makefile and Kconfig to support Microchip EMC2305 RPM-based PWM Fan Speed Controller. Signed-off-by: Michael Shych <michaelsh@nvidia.com> Reviewed-by: Vadim Pasternak <vadimp@nvidia.com>
|
Edits made, our patches squashed, and updated the PR. |
The driver had a number of issues, checkpatch warnings/errors, and other limitations, so fix these up to make it usable. Signed-off-by: Phil Elwell <phil@raspberrypi.com> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Submitted to linux-hwmon mailing list at https://patchwork.kernel.org/project/linux-hwmon/patch/20220430114905.53448-4-michaelsh@nvidia.com/ Add description of emc2305 driver. Signed-off-by: Michael Shych <michaelsh@nvidia.com> Reviewed-by: Vadim Pasternak <vadimp@nvidia.com>
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Add an i2c-fan overlay, initially with support for the EMC2301 fan controller found on the CM4IO board. Based on the overlay from Traverse Technologies, but modified for the EMC2305 driver submitted to linux-hwmon. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
Thanks! |
See: raspberrypi/linux#5026 kernel: Fixes for IGT crashes See: raspberrypi/linux#5022
See: raspberrypi/linux#5026 kernel: Fixes for IGT crashes See: raspberrypi/linux#5022
Largely a driver from mainline (not accepted), but with various tweaks by Phil and myself.
For CM4IO it needs
dtoverlay=i2c-fan,emc2301,i2c_csi_dsior similar. Can we make an easier line of eitherdtoverlay=cm4io-fan, ordtoverlay=i2c-fan,cm4io?I haven't squashed the changes together so Phil can see where I've deviated from his code, but can do before we merge.