hwmon: (max6650) Allow fan shutdown and initial rpm target

The fan can be stopped by writing "3" to pwm1_enable in sysfs.

Add devicetree property for early initialization of the fan controller
to prevent overheating, for example when resetting the board while the
fan was completely turned off.

Also improve error reporting, I2C failures were ignored while writing
new values.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
Mike Looijmans
2016-08-24 10:13:26 +02:00
committed by Guenter Roeck
parent a6cdeefeca
commit 20005cc58d
2 changed files with 68 additions and 41 deletions

View File

@@ -34,6 +34,7 @@ fan3_input ro "
fan4_input ro "
fan1_target rw desired fan speed in RPM (closed loop mode only)
pwm1_enable rw regulator mode, 0=full on, 1=open loop, 2=closed loop
3=off
pwm1 rw relative speed (0-255), 255=max. speed.
Used in open loop mode only.
fan1_div rw sets the speed range the inputs can handle. Legal