]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (lm85) Select the closest PWM frequency
authorJean Delvare <khali@linux-fr.org>
Fri, 17 Oct 2008 15:51:13 +0000 (17:51 +0200)
committerJean Delvare <khali@mahadeva.delvare>
Fri, 17 Oct 2008 15:51:13 +0000 (17:51 +0200)
commit94bf5ba1e26e606ad6de80b9bdf0760aebeb59dc
tree8bc829108fd362654f950dd9b3e98667c7831c6c
parent36feb6778822512d91f78b2c69b7522b004fd01d
hwmon: (lm85) Select the closest PWM frequency

The LM85 and compatible chips only support 8 arbitrary PWM frequencies.
The algorithm to pick one of them based on the user input is not
optimum. Improve it to always pick the closest supported frequency.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Herbert Poetzl <herbert@13thfloor.at>
drivers/hwmon/lm85.c