hwmon: (lm90) Stop using R_/W_ register prefix
[linux-block.git] / Documentation / hwmon / lm90.rst
CommitLineData
7f15b664
M
1Kernel driver lm90
2==================
3
4Supported chips:
b04f2f7d 5
7f15b664 6 * National Semiconductor LM90
b04f2f7d 7
7f15b664 8 Prefix: 'lm90'
b04f2f7d 9
7f15b664 10 Addresses scanned: I2C 0x4c
b04f2f7d 11
7f15b664 12 Datasheet: Publicly available at the National Semiconductor website
b04f2f7d
MCC
13
14 http://www.national.com/pf/LM/LM90.html
15
7f15b664 16 * National Semiconductor LM89
b04f2f7d 17
97ae60bb 18 Prefix: 'lm89' (no auto-detection)
b04f2f7d 19
7f15b664 20 Addresses scanned: I2C 0x4c and 0x4d
b04f2f7d 21
7f15b664 22 Datasheet: Publicly available at the National Semiconductor website
b04f2f7d
MCC
23
24 http://www.national.com/mpf/LM/LM89.html
25
7f15b664 26 * National Semiconductor LM99
b04f2f7d 27
7f15b664 28 Prefix: 'lm99'
b04f2f7d 29
7f15b664 30 Addresses scanned: I2C 0x4c and 0x4d
b04f2f7d 31
7f15b664 32 Datasheet: Publicly available at the National Semiconductor website
b04f2f7d
MCC
33
34 http://www.national.com/pf/LM/LM99.html
35
7f15b664 36 * National Semiconductor LM86
b04f2f7d 37
7f15b664 38 Prefix: 'lm86'
b04f2f7d 39
7f15b664 40 Addresses scanned: I2C 0x4c
b04f2f7d 41
7f15b664 42 Datasheet: Publicly available at the National Semiconductor website
b04f2f7d
MCC
43
44 http://www.national.com/mpf/LM/LM86.html
45
7f15b664 46 * Analog Devices ADM1032
b04f2f7d 47
7f15b664 48 Prefix: 'adm1032'
b04f2f7d 49
90209b42 50 Addresses scanned: I2C 0x4c and 0x4d
b04f2f7d 51
a874a10c 52 Datasheet: Publicly available at the ON Semiconductor website
b04f2f7d 53
6c7b66be 54 https://www.onsemi.com/PowerSolutions/product.do?id=ADM1032
b04f2f7d 55
7f15b664 56 * Analog Devices ADT7461
b04f2f7d 57
7f15b664 58 Prefix: 'adt7461'
b04f2f7d 59
90209b42 60 Addresses scanned: I2C 0x4c and 0x4d
b04f2f7d 61
a874a10c 62 Datasheet: Publicly available at the ON Semiconductor website
b04f2f7d 63
6c7b66be 64 https://www.onsemi.com/PowerSolutions/product.do?id=ADT7461
b04f2f7d 65
5a4e5e6a 66 * Analog Devices ADT7461A
b04f2f7d 67
5a4e5e6a 68 Prefix: 'adt7461a'
b04f2f7d 69
5a4e5e6a 70 Addresses scanned: I2C 0x4c and 0x4d
b04f2f7d 71
5a4e5e6a 72 Datasheet: Publicly available at the ON Semiconductor website
b04f2f7d 73
6c7b66be 74 https://www.onsemi.com/PowerSolutions/product.do?id=ADT7461A
b04f2f7d 75
5a4e5e6a 76 * ON Semiconductor NCT1008
b04f2f7d 77
5a4e5e6a 78 Prefix: 'nct1008'
b04f2f7d 79
5a4e5e6a 80 Addresses scanned: I2C 0x4c and 0x4d
b04f2f7d 81
5a4e5e6a 82 Datasheet: Publicly available at the ON Semiconductor website
b04f2f7d 83
6c7b66be 84 https://www.onsemi.com/PowerSolutions/product.do?id=NCT1008
b04f2f7d 85
271dabf5 86 * Maxim MAX6646
b04f2f7d 87
271dabf5 88 Prefix: 'max6646'
b04f2f7d 89
271dabf5 90 Addresses scanned: I2C 0x4d
b04f2f7d 91
271dabf5 92 Datasheet: Publicly available at the Maxim website
b04f2f7d
MCC
93
94 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3497
95
271dabf5 96 * Maxim MAX6647
b04f2f7d 97
271dabf5 98 Prefix: 'max6646'
b04f2f7d 99
271dabf5 100 Addresses scanned: I2C 0x4e
b04f2f7d 101
271dabf5 102 Datasheet: Publicly available at the Maxim website
b04f2f7d
MCC
103
104 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3497
105
1a51e068 106 * Maxim MAX6648
b04f2f7d 107
1a51e068 108 Prefix: 'max6646'
b04f2f7d 109
1a51e068 110 Addresses scanned: I2C 0x4c
b04f2f7d 111
1a51e068 112 Datasheet: Publicly available at the Maxim website
b04f2f7d
MCC
113
114 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3500
115
271dabf5 116 * Maxim MAX6649
b04f2f7d 117
271dabf5 118 Prefix: 'max6646'
b04f2f7d 119
271dabf5 120 Addresses scanned: I2C 0x4c
b04f2f7d 121
271dabf5 122 Datasheet: Publicly available at the Maxim website
b04f2f7d
MCC
123
124 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3497
125
229d495d
JL
126 * Maxim MAX6654
127
128 Prefix: 'max6654'
129
130 Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,
131
132 0x4c, 0x4d and 0x4e
133
134 Datasheet: Publicly available at the Maxim website
135
136 https://www.maximintegrated.com/en/products/sensors/MAX6654.html
137
7f15b664 138 * Maxim MAX6657
b04f2f7d 139
7f15b664 140 Prefix: 'max6657'
b04f2f7d 141
7f15b664 142 Addresses scanned: I2C 0x4c
b04f2f7d 143
7f15b664 144 Datasheet: Publicly available at the Maxim website
b04f2f7d
MCC
145
146 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578
147
7f15b664 148 * Maxim MAX6658
b04f2f7d 149
7f15b664 150 Prefix: 'max6657'
b04f2f7d 151
7f15b664 152 Addresses scanned: I2C 0x4c
b04f2f7d 153
7f15b664 154 Datasheet: Publicly available at the Maxim website
b04f2f7d
MCC
155
156 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578
157
7f15b664 158 * Maxim MAX6659
b04f2f7d 159
13c84951 160 Prefix: 'max6659'
b04f2f7d 161
13c84951 162 Addresses scanned: I2C 0x4c, 0x4d, 0x4e
b04f2f7d 163
7f15b664 164 Datasheet: Publicly available at the Maxim website
b04f2f7d
MCC
165
166 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578
167
32c82a93 168 * Maxim MAX6680
b04f2f7d 169
32c82a93 170 Prefix: 'max6680'
b04f2f7d 171
32c82a93 172 Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,
b04f2f7d
MCC
173
174 0x4c, 0x4d and 0x4e
175
32c82a93 176 Datasheet: Publicly available at the Maxim website
b04f2f7d
MCC
177
178 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3370
179
32c82a93 180 * Maxim MAX6681
b04f2f7d 181
32c82a93 182 Prefix: 'max6680'
b04f2f7d 183
32c82a93 184 Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,
b04f2f7d
MCC
185
186 0x4c, 0x4d and 0x4e
187
32c82a93 188 Datasheet: Publicly available at the Maxim website
b04f2f7d
MCC
189
190 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3370
191
1a51e068 192 * Maxim MAX6692
b04f2f7d 193
1a51e068 194 Prefix: 'max6646'
b04f2f7d 195
1a51e068 196 Addresses scanned: I2C 0x4c
b04f2f7d 197
1a51e068 198 Datasheet: Publicly available at the Maxim website
b04f2f7d
MCC
199
200 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3500
201
06e1c0a2 202 * Maxim MAX6695
b04f2f7d 203
06e1c0a2 204 Prefix: 'max6695'
b04f2f7d 205
06e1c0a2 206 Addresses scanned: I2C 0x18
b04f2f7d 207
06e1c0a2 208 Datasheet: Publicly available at the Maxim website
b04f2f7d
MCC
209
210 http://www.maxim-ic.com/datasheet/index.mvp/id/4199
211
06e1c0a2 212 * Maxim MAX6696
b04f2f7d 213
06e1c0a2 214 Prefix: 'max6695'
b04f2f7d 215
06e1c0a2 216 Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,
b04f2f7d
MCC
217
218 0x4c, 0x4d and 0x4e
219
06e1c0a2 220 Datasheet: Publicly available at the Maxim website
b04f2f7d
MCC
221
222 http://www.maxim-ic.com/datasheet/index.mvp/id/4199
223
c4f99a2b 224 * Winbond/Nuvoton W83L771W/G
b04f2f7d 225
c4f99a2b 226 Prefix: 'w83l771'
b04f2f7d 227
c4f99a2b 228 Addresses scanned: I2C 0x4c
b04f2f7d 229
c4f99a2b 230 Datasheet: No longer available
b04f2f7d 231
6771ea1f 232 * Winbond/Nuvoton W83L771AWG/ASG
b04f2f7d 233
6771ea1f 234 Prefix: 'w83l771'
b04f2f7d 235
6771ea1f 236 Addresses scanned: I2C 0x4c
b04f2f7d 237
6771ea1f 238 Datasheet: Not publicly available, can be requested from Nuvoton
b04f2f7d 239
2ef01793 240 * Philips/NXP SA56004X
b04f2f7d 241
2ef01793 242 Prefix: 'sa56004'
b04f2f7d 243
2ef01793 244 Addresses scanned: I2C 0x48 through 0x4F
b04f2f7d 245
2ef01793 246 Datasheet: Publicly available at NXP website
b04f2f7d
MCC
247
248 http://ics.nxp.com/products/interface/datasheet/sa56004x.pdf
249
ae544f64 250 * GMT G781
b04f2f7d 251
ae544f64 252 Prefix: 'g781'
b04f2f7d 253
ae544f64 254 Addresses scanned: I2C 0x4c, 0x4d
b04f2f7d 255
ae544f64 256 Datasheet: Not publicly available from GMT
b04f2f7d 257
1daaceb2 258 * Texas Instruments TMP451
b04f2f7d 259
1daaceb2 260 Prefix: 'tmp451'
b04f2f7d 261
1daaceb2 262 Addresses scanned: I2C 0x4c
b04f2f7d 263
1daaceb2 264 Datasheet: Publicly available at TI website
1daaceb2 265
6c7b66be 266 https://www.ti.com/litv/pdf/sbos686
7f15b664 267
f8344f76
GR
268 * Texas Instruments TMP461
269
270 Prefix: 'tmp461'
271
272 Addresses scanned: I2C 0x48 through 0x4F
273
274 Datasheet: Publicly available at TI website
275
276 https://www.ti.com/lit/gpn/tmp461
277
7c81c60f 278Author: Jean Delvare <jdelvare@suse.de>
7f15b664
M
279
280
281Description
282-----------
283
284The LM90 is a digital temperature sensor. It senses its own temperature as
285well as the temperature of up to one external diode. It is compatible
23b2d477 286with many other devices, many of which are supported by this driver.
32c82a93
RB
287
288Note that there is no easy way to differentiate between the MAX6657,
6948708d
GR
289MAX6658 and MAX6659 variants. The extra features of the MAX6659 are only
290supported by this driver if the chip is located at address 0x4d or 0x4e,
291or if the chip type is explicitly selected as max6659.
292The MAX6680 and MAX6681 only differ in their pinout, therefore they obviously
293can't (and don't need to) be distinguished.
7f15b664
M
294
295The specificity of this family of chipsets over the ADM1021/LM84
296family is that it features critical limits with hysteresis, and an
297increased resolution of the remote temperature measurement.
298
299The different chipsets of the family are not strictly identical, although
f65e1708
JD
300very similar. For reference, here comes a non-exhaustive list of specific
301features:
7f15b664
M
302
303LM90:
304 * Filter and alert configuration register at 0xBF.
305 * ALERT is triggered by temperatures over critical limits.
306
307LM86 and LM89:
308 * Same as LM90
309 * Better external channel accuracy
310
311LM99:
312 * Same as LM89
313 * External temperature shifted by 16 degrees down
314
315ADM1032:
316 * Consecutive alert register at 0x22.
317 * Conversion averaging.
318 * Up to 64 conversions/s.
319 * ALERT is triggered by open remote sensor.
c3df5806 320 * SMBus PEC support for Write Byte and Receive Byte transactions.
7f15b664 321
5a4e5e6a 322ADT7461, ADT7461A, NCT1008:
7f15b664
M
323 * Extended temperature range (breaks compatibility)
324 * Lower resolution for remote temperature
325
229d495d
JL
326MAX6654:
327 * Better local resolution
328 * Selectable address
329 * Remote sensor type selection
330 * Extended temperature range
331 * Extended resolution only available when conversion rate <= 1 Hz
332
7f15b664 333MAX6657 and MAX6658:
f65e1708 334 * Better local resolution
7f15b664
M
335 * Remote sensor type selection
336
32c82a93 337MAX6659:
f65e1708 338 * Better local resolution
7f15b664
M
339 * Selectable address
340 * Second critical temperature limit
341 * Remote sensor type selection
342
32c82a93
RB
343MAX6680 and MAX6681:
344 * Selectable address
345 * Remote sensor type selection
346
06e1c0a2
GR
347MAX6695 and MAX6696:
348 * Better local resolution
349 * Selectable address (max6696)
350 * Second critical temperature limit
351 * Two remote sensors
352
c4f99a2b
JD
353W83L771W/G
354 * The G variant is lead-free, otherwise similar to the W.
355 * Filter and alert configuration register at 0xBF
356 * Moving average (depending on conversion rate)
357
6771ea1f 358W83L771AWG/ASG
c4f99a2b 359 * Successor of the W83L771W/G, same features.
6771ea1f 360 * The AWG and ASG variants only differ in package format.
6771ea1f 361 * Diode ideality factor configuration (remote sensor) at 0xE3
6771ea1f 362
2ef01793
SD
363SA56004X:
364 * Better local resolution
365
7f15b664
M
366All temperature values are given in degrees Celsius. Resolution
367is 1.0 degree for the local temperature, 0.125 degree for the remote
229d495d
JL
368temperature, except for the MAX6654, MAX6657, MAX6658 and MAX6659 which have
369a resolution of 0.125 degree for both temperatures.
7f15b664
M
370
371Each sensor has its own high and low limits, plus a critical limit.
372Additionally, there is a relative hysteresis value common to both critical
373values. To make life easier to user-space applications, two absolute values
374are exported, one for each channel, but these values are of course linked.
375Only the local hysteresis can be set from user-space, and the same delta
376applies to the remote hysteresis.
377
177e7592
GR
378The lm90 driver will not update its values more frequently than configured with
379the update_interval attribute; reading them more often will do no harm, but will
380return 'old' values.
7f15b664 381
53de3342
JD
382SMBus Alert Support
383-------------------
384
385This driver has basic support for SMBus alert. When an alert is received,
386the status register is read and the faulty temperature channel is logged.
387
5a4e5e6a
GR
388The Analog Devices chips (ADM1032, ADT7461 and ADT7461A) and ON
389Semiconductor chips (NCT1008) do not implement the SMBus alert protocol
390properly so additional care is needed: the ALERT output is disabled when
391an alert is received, and is re-enabled only when the alarm is gone.
392Otherwise the chip would block alerts from other chips in the bus as long
393as the alarm is active.
53de3342 394
c3df5806
JD
395PEC Support
396-----------
397
398The ADM1032 is the only chip of the family which supports PEC. It does
399not support PEC on all transactions though, so some care must be taken.
400
401When reading a register value, the PEC byte is computed and sent by the
402ADM1032 chip. However, in the case of a combined transaction (SMBus Read
403Byte), the ADM1032 computes the CRC value over only the second half of
404the message rather than its entirety, because it thinks the first half
405of the message belongs to a different transaction. As a result, the CRC
406value differs from what the SMBus master expects, and all reads fail.
407
408For this reason, the lm90 driver will enable PEC for the ADM1032 only if
409the bus supports the SMBus Send Byte and Receive Byte transaction types.
410These transactions will be used to read register values, instead of
411SMBus Read Byte, and PEC will work properly.
412
413Additionally, the ADM1032 doesn't support SMBus Send Byte with PEC.
414Instead, it will try to write the PEC value to the register (because the
415SMBus Send Byte transaction with PEC is similar to a Write Byte transaction
0966415d 416without PEC), which is not what we want. Thus, PEC is explicitly disabled
c3df5806
JD
417on SMBus Send Byte transactions in the lm90 driver.
418
419PEC on byte data transactions represents a significant increase in bandwidth
420usage (+33% for writes, +25% for reads) in normal conditions. With the need
421to use two SMBus transaction for reads, this overhead jumps to +50%. Worse,
422two transactions will typically mean twice as much delay waiting for
423transaction completion, effectively doubling the register cache refresh time.
424I guess reliability comes at a price, but it's quite expensive this time.
425
426So, as not everyone might enjoy the slowdown, PEC can be disabled through
427sysfs. Just write 0 to the "pec" file and PEC will be disabled. Write 1
428to that file to enable PEC again.