]> git.karo-electronics.de Git - karo-tx-linux.git/commit
hwmon: (lm75) Tune resolution and sample time per chip
authorJean Delvare <khali@linux-fr.org>
Mon, 18 Mar 2013 22:57:25 +0000 (09:57 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 18 Mar 2013 22:57:25 +0000 (09:57 +1100)
commit3b561386c6e1583e4cda2f6b215f3c2b058f443e
tree2a58da14c88fa9016051bbb18a6d6faf881aa27a
parentb75641009620c493edb3bc9483b7916ad77c306b
hwmon: (lm75) Tune resolution and sample time per chip

Most LM75-compatible chips can either sample much faster or with a
much better resolution than the original LM75 chip. So far the lm75
driver did not let the user take benefit of these improvements. Do it
now.

I decided to almost always configure the chip to use the best
resolution possible, which also means the longest sample time. The
only chips for which I didn't are the DS75, DS1775 and STDS75, because
they are really too slow in 12-bit mode (1.2 to 1.5 second worst case)
so I went for 11-bit mode as a more reasonable tradeoff. This choice is
dictated by the fact that the hwmon subsystem is meant for system
monitoring, it has never been supposed to be ultra-fast, and as a
matter of fact we do cache the sampled values in almost all drivers.

If anyone isn't pleased with these default settings, they can always
introduce a platform data structure or DT support for the lm75. That
being said, it seems nobody ever complained that the driver wouldn't
refresh the value faster than every 1.5 second, and the change made
it faster for all chips even in 12-bit mode, so I don't expect any
complaint.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Documentation/hwmon/lm75
drivers/hwmon/lm75.c