[PATCH] w83792d: Fix setting the PWM value
authorYuan Mu <ymu@winbond.com.tw>
Sun, 4 Jun 2006 18:18:05 +0000 (20:18 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 22 Jun 2006 18:10:34 +0000 (11:10 -0700)
commit53e2761bb2e4ed58913c266ad13e8c10692aec1e
tree163840e48c2a50f4a86f2a584cd9a697c065075a
parent3dc26c600cbae8e8e7566136148aef5667e8342b
[PATCH] w83792d: Fix setting the PWM value

W83792D use pwm register low 4 bits to store PWM/DC value, bit 7
is used to store fan PWM/DC mode. The store_pwm function did not
convert the pwm input correctly, so it may change the fan mode
when new value is set.

This fix the problem. Change the "index" value of pwm*_mode
and pwm* SENSOR_ATTR to simplify code.

Signed-off-by: Yuan Mu <ymu@winbond.com.tw>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/hwmon/w83792d.c