Commit 426343ef34fac426e619176c84cb2e263b9ed23d

Authored by Jean Delvare
Committed by Guenter Roeck
1 parent 03f5de2bb7

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>

Showing 2 changed files with 58 additions and 37 deletions Side-by-side Diff

Documentation/hwmon/lm75
... ... @@ -12,31 +12,46 @@
12 12 Addresses scanned: I2C 0x48 - 0x4f
13 13 Datasheet: Publicly available at the National Semiconductor website
14 14 http://www.national.com/
15   - * Dallas Semiconductor DS75
16   - Prefix: 'lm75'
17   - Addresses scanned: I2C 0x48 - 0x4f
  15 + * Dallas Semiconductor DS75, DS1775
  16 + Prefixes: 'ds75', 'ds1775'
  17 + Addresses scanned: none
18 18 Datasheet: Publicly available at the Dallas Semiconductor website
19 19 http://www.maxim-ic.com/
20   - * Dallas Semiconductor DS1775
21   - Prefix: 'lm75'
22   - Addresses scanned: I2C 0x48 - 0x4f
23   - Datasheet: Publicly available at the Dallas Semiconductor website
24   - http://www.maxim-ic.com/
25 20 * Maxim MAX6625, MAX6626
26   - Prefix: 'lm75'
27   - Addresses scanned: I2C 0x48 - 0x4b
  21 + Prefixes: 'max6625', 'max6626'
  22 + Addresses scanned: none
28 23 Datasheet: Publicly available at the Maxim website
29 24 http://www.maxim-ic.com/
30 25 * Microchip (TelCom) TCN75
31 26 Prefix: 'lm75'
32   - Addresses scanned: I2C 0x48 - 0x4f
  27 + Addresses scanned: none
33 28 Datasheet: Publicly available at the Microchip website
34 29 http://www.microchip.com/
  30 + * Microchip MCP9800, MCP9801, MCP9802, MCP9803
  31 + Prefix: 'mcp980x'
  32 + Addresses scanned: none
  33 + Datasheet: Publicly available at the Microchip website
  34 + http://www.microchip.com/
35 35 * Analog Devices ADT75
36 36 Prefix: 'adt75'
37   - Addresses scanned: I2C 0x48 - 0x4f
  37 + Addresses scanned: none
38 38 Datasheet: Publicly available at the Analog Devices website
39 39 http://www.analog.com/adt75
  40 + * ST Microelectronics STDS75
  41 + Prefix: 'stds75'
  42 + Addresses scanned: none
  43 + Datasheet: Publicly available at the ST website
  44 + http://www.st.com/internet/analog/product/121769.jsp
  45 + * Texas Instruments TMP100, TMP101, TMP105, TMP75, TMP175, TMP275
  46 + Prefixes: 'tmp100', 'tmp101', 'tmp105', 'tmp175', 'tmp75', 'tmp275'
  47 + Addresses scanned: none
  48 + Datasheet: Publicly available at the Texas Instruments website
  49 + http://www.ti.com/product/tmp100
  50 + http://www.ti.com/product/tmp101
  51 + http://www.ti.com/product/tmp105
  52 + http://www.ti.com/product/tmp75
  53 + http://www.ti.com/product/tmp175
  54 + http://www.ti.com/product/tmp275
40 55  
41 56 Author: Frodo Looijaard <frodol@dds.nl>
42 57  
43 58  
44 59  
... ... @@ -55,21 +70,16 @@
55 70 The LM75 only updates its values each 1.5 seconds; reading it more often
56 71 will do no harm, but will return 'old' values.
57 72  
58   -The LM75 is usually used in combination with LM78-like chips, to measure
59   -the temperature of the processor(s).
  73 +The original LM75 was typically used in combination with LM78-like chips
  74 +on PC motherboards, to measure the temperature of the processor(s). Clones
  75 +are now used in various embedded designs.
60 76  
61   -The DS75, DS1775, MAX6625, and MAX6626 are supported as well.
62   -They are not distinguished from an LM75. While most of these chips
63   -have three additional bits of accuracy (12 vs. 9 for the LM75),
64   -the additional bits are not supported. Not only that, but these chips will
65   -not be detected if not in 9-bit precision mode (use the force parameter if
66   -needed).
67   -
68   -The TCN75 is supported as well, and is not distinguished from an LM75.
69   -
70 77 The LM75 is essentially an industry standard; there may be other
71 78 LM75 clones not listed here, with or without various enhancements,
72   -that are supported.
  79 +that are supported. The clones are not detected by the driver, unless
  80 +they reproduce the exact register tricks of the original LM75, and must
  81 +therefore be instantiated explicitly. The specific enhancements (such as
  82 +higher resolution) are not currently supported by the driver.
73 83  
74 84 The LM77 is not supported, contrary to what we pretended for a long time.
75 85 Both chips are simply not compatible, value encoding differs.
drivers/hwmon/lm75.c
... ... @@ -249,19 +249,30 @@
249 249 I2C_FUNC_SMBUS_WORD_DATA))
250 250 return -ENODEV;
251 251  
252   - /* Now, we do the remaining detection. There is no identification-
253   - dedicated register so we have to rely on several tricks:
254   - unused bits, registers cycling over 8-address boundaries,
255   - addresses 0x04-0x07 returning the last read value.
256   - The cycling+unused addresses combination is not tested,
257   - since it would significantly slow the detection down and would
258   - hardly add any value.
259   -
260   - The National Semiconductor LM75A is different than earlier
261   - LM75s. It has an ID byte of 0xaX (where X is the chip
262   - revision, with 1 being the only revision in existence) in
263   - register 7, and unused registers return 0xff rather than the
264   - last read value. */
  252 + /*
  253 + * Now, we do the remaining detection. There is no identification-
  254 + * dedicated register so we have to rely on several tricks:
  255 + * unused bits, registers cycling over 8-address boundaries,
  256 + * addresses 0x04-0x07 returning the last read value.
  257 + * The cycling+unused addresses combination is not tested,
  258 + * since it would significantly slow the detection down and would
  259 + * hardly add any value.
  260 + *
  261 + * The National Semiconductor LM75A is different than earlier
  262 + * LM75s. It has an ID byte of 0xaX (where X is the chip
  263 + * revision, with 1 being the only revision in existence) in
  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 277 /* Unused bits */
267 278 conf = i2c_smbus_read_byte_data(new_client, 1);