]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (lm75) Strengthen detect function
authorGuenter Roeck <linux@roeck-us.net>
Thu, 4 Dec 2014 17:58:15 +0000 (09:58 -0800)
committerGuenter Roeck <linux@roeck-us.net>
Fri, 5 Dec 2014 18:18:02 +0000 (10:18 -0800)
commiteeb935b7dfebce30013961559933957cc07df673
treed645f9b83c36b6aa231740ab1f8926f2158f7c99
parent3c97026f296452029fe89cbd6b54899be51e5848
hwmon: (lm75) Strengthen detect function

A chip returning 0x00 in all registers is erroneously detected
as LM75. Check hysteresis and temperature limit registers and
abort if both are 0 to reduce the likelyhood for this to happen.

Reviewed-by: Rob Coulson <rob.coulson@gmail.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/lm75.c