diff options
-rw-r--r-- | Documentation/hwmon/lm75 | 58 | ||||
-rw-r--r-- | drivers/hwmon/lm75.c | 37 |
2 files changed, 58 insertions, 37 deletions
diff --git a/Documentation/hwmon/lm75 b/Documentation/hwmon/lm75 index 8d40d0fda10a..c91a1d15fa28 100644 --- a/Documentation/hwmon/lm75 +++ b/Documentation/hwmon/lm75 | |||
@@ -12,31 +12,46 @@ Supported chips: | |||
12 | Addresses scanned: I2C 0x48 - 0x4f | 12 | Addresses scanned: I2C 0x48 - 0x4f |
13 | Datasheet: Publicly available at the National Semiconductor website | 13 | Datasheet: Publicly available at the National Semiconductor website |
14 | http://www.national.com/ | 14 | http://www.national.com/ |
15 | * Dallas Semiconductor DS75 | 15 | * Dallas Semiconductor DS75, DS1775 |
16 | Prefix: 'lm75' | 16 | Prefixes: 'ds75', 'ds1775' |
17 | Addresses scanned: I2C 0x48 - 0x4f | 17 | Addresses scanned: none |
18 | Datasheet: Publicly available at the Dallas Semiconductor website | ||
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 | 18 | Datasheet: Publicly available at the Dallas Semiconductor website |
24 | http://www.maxim-ic.com/ | 19 | http://www.maxim-ic.com/ |
25 | * Maxim MAX6625, MAX6626 | 20 | * Maxim MAX6625, MAX6626 |
26 | Prefix: 'lm75' | 21 | Prefixes: 'max6625', 'max6626' |
27 | Addresses scanned: I2C 0x48 - 0x4b | 22 | Addresses scanned: none |
28 | Datasheet: Publicly available at the Maxim website | 23 | Datasheet: Publicly available at the Maxim website |
29 | http://www.maxim-ic.com/ | 24 | http://www.maxim-ic.com/ |
30 | * Microchip (TelCom) TCN75 | 25 | * Microchip (TelCom) TCN75 |
31 | Prefix: 'lm75' | 26 | Prefix: 'lm75' |
32 | Addresses scanned: I2C 0x48 - 0x4f | 27 | Addresses scanned: none |
28 | Datasheet: Publicly available at the Microchip website | ||
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 | 33 | Datasheet: Publicly available at the Microchip website |
34 | http://www.microchip.com/ | 34 | http://www.microchip.com/ |
35 | * Analog Devices ADT75 | 35 | * Analog Devices ADT75 |
36 | Prefix: 'adt75' | 36 | Prefix: 'adt75' |
37 | Addresses scanned: I2C 0x48 - 0x4f | 37 | Addresses scanned: none |
38 | Datasheet: Publicly available at the Analog Devices website | 38 | Datasheet: Publicly available at the Analog Devices website |
39 | http://www.analog.com/adt75 | 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 | Author: Frodo Looijaard <frodol@dds.nl> | 56 | Author: Frodo Looijaard <frodol@dds.nl> |
42 | 57 | ||
@@ -55,21 +70,16 @@ range of -55 to +125 degrees. | |||
55 | The LM75 only updates its values each 1.5 seconds; reading it more often | 70 | The LM75 only updates its values each 1.5 seconds; reading it more often |
56 | will do no harm, but will return 'old' values. | 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 | 73 | The original LM75 was typically used in combination with LM78-like chips |
59 | the temperature of the processor(s). | 74 | on PC motherboards, to measure the temperature of the processor(s). Clones |
60 | 75 | are now used in various embedded designs. | |
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 | 76 | ||
70 | The LM75 is essentially an industry standard; there may be other | 77 | The LM75 is essentially an industry standard; there may be other |
71 | LM75 clones not listed here, with or without various enhancements, | 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 | The LM77 is not supported, contrary to what we pretended for a long time. | 84 | The LM77 is not supported, contrary to what we pretended for a long time. |
75 | Both chips are simply not compatible, value encoding differs. | 85 | Both chips are simply not compatible, value encoding differs. |
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); |