aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/lm75.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2011-10-13 17:15:11 -0400
committerGuenter Roeck <guenter.roeck@ericsson.com>2011-10-24 14:09:47 -0400
commit426343ef34fac426e619176c84cb2e263b9ed23d (patch)
tree829427f02e62a744ffe2c450462353136e11b6d5 /drivers/hwmon/lm75.c
parent03f5de2bb7125e537c81030925f38674307e6a71 (diff)
hwmon: (lm75) Document why clones are not detected
Explain why clones of the LM75 are generally not detected by the driver, and why this isn't going to change. Also update the documentation to reflect the list of chip names currently supported by the driver. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Diffstat (limited to 'drivers/hwmon/lm75.c')
-rw-r--r--drivers/hwmon/lm75.c37
1 files changed, 24 insertions, 13 deletions
diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
index 669481baac00..90126a2a1e44 100644
--- a/drivers/hwmon/lm75.c
+++ b/drivers/hwmon/lm75.c
@@ -249,19 +249,30 @@ static int lm75_detect(struct i2c_client *new_client,
249 I2C_FUNC_SMBUS_WORD_DATA)) 249 I2C_FUNC_SMBUS_WORD_DATA))
250 return -ENODEV; 250 return -ENODEV;
251 251
252 /* Now, we do the remaining detection. There is no identification- 252 /*
253 dedicated register so we have to rely on several tricks: 253 * Now, we do the remaining detection. There is no identification-
254 unused bits, registers cycling over 8-address boundaries, 254 * dedicated register so we have to rely on several tricks:
255 addresses 0x04-0x07 returning the last read value. 255 * unused bits, registers cycling over 8-address boundaries,
256 The cycling+unused addresses combination is not tested, 256 * addresses 0x04-0x07 returning the last read value.
257 since it would significantly slow the detection down and would 257 * The cycling+unused addresses combination is not tested,
258 hardly add any value. 258 * since it would significantly slow the detection down and would
259 259 * hardly add any value.
260 The National Semiconductor LM75A is different than earlier 260 *
261 LM75s. It has an ID byte of 0xaX (where X is the chip 261 * The National Semiconductor LM75A is different than earlier
262 revision, with 1 being the only revision in existence) in 262 * LM75s. It has an ID byte of 0xaX (where X is the chip
263 register 7, and unused registers return 0xff rather than the 263 * revision, with 1 being the only revision in existence) in
264 last read value. */ 264 * register 7, and unused registers return 0xff rather than the
265 * last read value.
266 *
267 * Note that this function only detects the original National
268 * Semiconductor LM75 and the LM75A. Clones from other vendors
269 * aren't detected, on purpose, because they are typically never
270 * found on PC hardware. They are found on embedded designs where
271 * they can be instantiated explicitly so detection is not needed.
272 * The absence of identification registers on all these clones
273 * would make their exhaustive detection very difficult and weak,
274 * and odds are that the driver would bind to unsupported devices.
275 */
265 276
266 /* Unused bits */ 277 /* Unused bits */
267 conf = i2c_smbus_read_byte_data(new_client, 1); 278 conf = i2c_smbus_read_byte_data(new_client, 1);