hwmon: (w83795) Fix PWM duty cycle frequency attributes
authorJean Delvare <khali@linux-fr.org>
Thu, 28 Oct 2010 18:31:47 +0000 (20:31 +0200)
committerJean Delvare <khali@endymion.delvare>
Thu, 28 Oct 2010 18:31:47 +0000 (20:31 +0200)
commit01879a855fb6bdb3fb820344a7a145de8a5cdbda
tree152e9a958bfdd71692455d18348623b1cbb40929
parent0e256018b0f35d1b22ca37e1d0e207f7ba3d0076
hwmon: (w83795) Fix PWM duty cycle frequency attributes

The PWM duty cycle frequenty attributes are improperly named
(fanN_div instead of pwmN_div) and contain raw values instead of
actual frequencies. Rename them and fix their contents.

Also improve the logic when the user asks for a new frequency, to
always pick the closest supported frequency. The algorithm could
certainly be optimized, but the operation is infrequent enough that
I don't think it's worth the effort.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/hwmon/w83795.c