Back to home page

OSCL-LXR

 
 

    


0001 Kernel driver lm90
0002 ==================
0003 
0004 Supported chips:
0005 
0006   * National Semiconductor LM84
0007 
0008     Prefix: 'lm84'
0009 
0010     Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
0011 
0012     Datasheet: Publicly available at the National Semiconductor website
0013 
0014   * National Semiconductor LM90
0015 
0016     Prefix: 'lm90'
0017 
0018     Addresses scanned: I2C 0x4c
0019 
0020     Datasheet: Publicly available at the National Semiconductor website
0021 
0022                http://www.national.com/pf/LM/LM90.html
0023 
0024   * National Semiconductor LM89
0025 
0026     Prefix: 'lm89' (no auto-detection)
0027 
0028     Addresses scanned: I2C 0x4c and 0x4d
0029 
0030     Datasheet: Publicly available at the National Semiconductor website
0031 
0032                http://www.national.com/mpf/LM/LM89.html
0033 
0034   * National Semiconductor LM99
0035 
0036     Prefix: 'lm99'
0037 
0038     Addresses scanned: I2C 0x4c and 0x4d
0039 
0040     Datasheet: Publicly available at the National Semiconductor website
0041 
0042                http://www.national.com/pf/LM/LM99.html
0043 
0044   * National Semiconductor LM86
0045 
0046     Prefix: 'lm86'
0047 
0048     Addresses scanned: I2C 0x4c
0049 
0050     Datasheet: Publicly available at the National Semiconductor website
0051 
0052                http://www.national.com/mpf/LM/LM86.html
0053 
0054   * Analog Devices ADM1020
0055 
0056     Prefix: 'adm1020'
0057 
0058     Addresses scanned: I2C 0x4c - 0x4e
0059 
0060     Datasheet: Publicly available at the Analog Devices website
0061 
0062   * Analog Devices ADM1021
0063 
0064     Prefix: 'adm1021'
0065 
0066     Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
0067 
0068     Datasheet: Publicly available at the Analog Devices website
0069 
0070   * Analog Devices ADM1021A/ADM1023
0071 
0072     Prefix: 'adm1023'
0073 
0074     Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
0075 
0076     Datasheet: Publicly available at the Analog Devices website
0077 
0078   * Analog Devices ADM1032
0079 
0080     Prefix: 'adm1032'
0081 
0082     Addresses scanned: I2C 0x4c and 0x4d
0083 
0084     Datasheet: Publicly available at the ON Semiconductor website
0085 
0086                https://www.onsemi.com/PowerSolutions/product.do?id=ADM1032
0087 
0088   * Analog Devices ADT7461
0089 
0090     Prefix: 'adt7461'
0091 
0092     Addresses scanned: I2C 0x4c and 0x4d
0093 
0094     Datasheet: Publicly available at the ON Semiconductor website
0095 
0096                https://www.onsemi.com/PowerSolutions/product.do?id=ADT7461
0097 
0098   * Analog Devices ADT7461A
0099 
0100     Prefix: 'adt7461a'
0101 
0102     Addresses scanned: I2C 0x4c and 0x4d
0103 
0104     Datasheet: Publicly available at the ON Semiconductor website
0105 
0106                https://www.onsemi.com/PowerSolutions/product.do?id=ADT7461A
0107 
0108   * Analog Devices ADT7481
0109 
0110     Prefix: 'adt7481'
0111 
0112     Addresses scanned: I2C 0x4b and 0x4c
0113 
0114     Datasheet: Publicly available at the ON Semiconductor website
0115 
0116                https://www.onsemi.com/PowerSolutions/product.do?id=ADT7481
0117 
0118   * Analog Devices ADT7482
0119 
0120     Prefix: 'adt7482'
0121 
0122     Addresses scanned: I2C 0x4c
0123 
0124     Datasheet: Publicly available at the ON Semiconductor website
0125 
0126                https://www.onsemi.com/PowerSolutions/product.do?id=ADT7482
0127 
0128   * Analog Devices ADT7483A
0129 
0130     Prefix: 'adt7483a'
0131 
0132     Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b, 0x4c, 0x4d, 0x4e
0133 
0134     Datasheet: Publicly available at the ON Semiconductor website
0135 
0136                https://www.onsemi.com/PowerSolutions/product.do?id=ADT7483A
0137 
0138   * ON Semiconductor NCT1008
0139 
0140     Prefix: 'nct1008'
0141 
0142     Addresses scanned: I2C 0x4c and 0x4d
0143 
0144     Datasheet: Publicly available at the ON Semiconductor website
0145 
0146                https://www.onsemi.com/PowerSolutions/product.do?id=NCT1008
0147 
0148   * ON Semiconductor NCT210
0149 
0150     Prefix: 'adm1021'
0151 
0152     Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
0153 
0154     Datasheet: Publicly available at the ON Semiconductor website
0155 
0156                https://www.onsemi.com/PowerSolutions/product.do?id=NCT210
0157 
0158   * ON Semiconductor NCT214
0159 
0160     Prefix: 'nct214'
0161 
0162     Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
0163 
0164     Datasheet: Publicly available at the ON Semiconductor website
0165 
0166                https://www.onsemi.com/PowerSolutions/product.do?id=NCT214
0167 
0168   * ON Semiconductor NCT218
0169 
0170     Prefix: 'nct218'
0171 
0172     Addresses scanned: I2C 0x4c - 0x4d
0173 
0174     Datasheet: Publicly available at the ON Semiconductor website
0175 
0176                https://www.onsemi.com/PowerSolutions/product.do?id=NCT218
0177 
0178   * ON Semiconductor NCT72
0179 
0180     Prefix: 'nct72'
0181 
0182     Addresses scanned: I2C 0x4c - 0x4d
0183 
0184     Datasheet: Publicly available at the ON Semiconductor website
0185 
0186                https://www.onsemi.com/PowerSolutions/product.do?id=NCT72
0187 
0188   * Maxim MAX1617
0189 
0190     Prefix: 'max1617'
0191 
0192     Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
0193 
0194     Datasheet: Publicly available at the Maxim website
0195 
0196   * Maxim MAX1617A
0197 
0198     Prefix: 'max1617a'
0199 
0200     Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
0201 
0202     Datasheet: Publicly available at the Maxim website
0203 
0204   * Maxim MAX6642
0205 
0206     Prefix: 'max6642'
0207 
0208     Addresses scanned: I2C 0x48-0x4f
0209 
0210     Datasheet: Publicly available at the Maxim website
0211 
0212                http://datasheets.maxim-ic.com/en/ds/MAX6642.pdf
0213 
0214   * Maxim MAX6646
0215 
0216     Prefix: 'max6646'
0217 
0218     Addresses scanned: I2C 0x4d
0219 
0220     Datasheet: Publicly available at the Maxim website
0221 
0222                http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3497
0223 
0224   * Maxim MAX6647
0225 
0226     Prefix: 'max6646'
0227 
0228     Addresses scanned: I2C 0x4e
0229 
0230     Datasheet: Publicly available at the Maxim website
0231 
0232                http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3497
0233 
0234   * Maxim MAX6648
0235 
0236     Prefix: 'max6648'
0237 
0238     Addresses scanned: I2C 0x4c
0239 
0240     Datasheet: Publicly available at the Maxim website
0241 
0242                http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3500
0243 
0244   * Maxim MAX6649
0245 
0246     Prefix: 'max6646'
0247 
0248     Addresses scanned: I2C 0x4c
0249 
0250     Datasheet: Publicly available at the Maxim website
0251 
0252                http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3497
0253 
0254   * Maxim MAX6654
0255 
0256     Prefix: 'max6654'
0257 
0258     Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,
0259 
0260                            0x4c, 0x4d and 0x4e
0261 
0262     Datasheet: Publicly available at the Maxim website
0263 
0264                https://www.maximintegrated.com/en/products/sensors/MAX6654.html
0265 
0266   * Maxim MAX6657
0267 
0268     Prefix: 'max6657'
0269 
0270     Addresses scanned: I2C 0x4c
0271 
0272     Datasheet: Publicly available at the Maxim website
0273 
0274                http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578
0275 
0276   * Maxim MAX6658
0277 
0278     Prefix: 'max6657'
0279 
0280     Addresses scanned: I2C 0x4c
0281 
0282     Datasheet: Publicly available at the Maxim website
0283 
0284                http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578
0285 
0286   * Maxim MAX6659
0287 
0288     Prefix: 'max6659'
0289 
0290     Addresses scanned: I2C 0x4c, 0x4d, 0x4e
0291 
0292     Datasheet: Publicly available at the Maxim website
0293 
0294                http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578
0295 
0296   * Maxim MAX6680
0297 
0298     Prefix: 'max6680'
0299 
0300     Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,
0301 
0302                            0x4c, 0x4d and 0x4e
0303 
0304     Datasheet: Publicly available at the Maxim website
0305 
0306                http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3370
0307 
0308   * Maxim MAX6681
0309 
0310     Prefix: 'max6680'
0311 
0312     Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,
0313 
0314                            0x4c, 0x4d and 0x4e
0315 
0316     Datasheet: Publicly available at the Maxim website
0317 
0318                http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3370
0319 
0320   * Maxim MAX6692
0321 
0322     Prefix: 'max6648'
0323 
0324     Addresses scanned: I2C 0x4c
0325 
0326     Datasheet: Publicly available at the Maxim website
0327 
0328                http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3500
0329 
0330   * Maxim MAX6695
0331 
0332     Prefix: 'max6695'
0333 
0334     Addresses scanned: I2C 0x18
0335 
0336     Datasheet: Publicly available at the Maxim website
0337 
0338                http://www.maxim-ic.com/datasheet/index.mvp/id/4199
0339 
0340   * Maxim MAX6696
0341 
0342     Prefix: 'max6695'
0343 
0344     Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,
0345 
0346                            0x4c, 0x4d and 0x4e
0347 
0348     Datasheet: Publicly available at the Maxim website
0349 
0350                http://www.maxim-ic.com/datasheet/index.mvp/id/4199
0351 
0352   * Winbond/Nuvoton W83L771W/G
0353 
0354     Prefix: 'w83l771'
0355 
0356     Addresses scanned: I2C 0x4c
0357 
0358     Datasheet: No longer available
0359 
0360   * Winbond/Nuvoton W83L771AWG/ASG
0361 
0362     Prefix: 'w83l771'
0363 
0364     Addresses scanned: I2C 0x4c
0365 
0366     Datasheet: Not publicly available, can be requested from Nuvoton
0367 
0368   * Philips/NXP SA56004X
0369 
0370     Prefix: 'sa56004'
0371 
0372     Addresses scanned: I2C 0x48 through 0x4F
0373 
0374     Datasheet: Publicly available at NXP website
0375 
0376                http://ics.nxp.com/products/interface/datasheet/sa56004x.pdf
0377 
0378   * GMT G781
0379 
0380     Prefix: 'g781'
0381 
0382     Addresses scanned: I2C 0x4c, 0x4d
0383 
0384     Datasheet: Not publicly available from GMT
0385 
0386   * Texas Instruments TMP451
0387 
0388     Prefix: 'tmp451'
0389 
0390     Addresses scanned: I2C 0x4c
0391 
0392     Datasheet: Publicly available at TI website
0393 
0394                https://www.ti.com/litv/pdf/sbos686
0395 
0396   * Texas Instruments TMP461
0397 
0398     Prefix: 'tmp461'
0399 
0400     Addresses scanned: I2C 0x48 through 0x4F
0401 
0402     Datasheet: Publicly available at TI website
0403 
0404                https://www.ti.com/lit/gpn/tmp461
0405 
0406   * Philips NE1617, NE1617A
0407 
0408     Prefix: 'max1617' (probably detected as a max1617)
0409 
0410     Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
0411 
0412     Datasheets: Publicly available at the Philips website
0413 
0414   * Philips NE1618
0415 
0416     Prefix: 'ne1618'
0417 
0418     Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
0419 
0420     Datasheets: Publicly available at the Philips website
0421 
0422   * Genesys Logic GL523SM
0423 
0424     Prefix: 'gl523sm'
0425 
0426     Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
0427 
0428     Datasheet:
0429 
0430   * TI THMC10
0431 
0432     Prefix: 'thmc10'
0433 
0434     Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
0435 
0436     Datasheet: Publicly available at the TI website
0437 
0438   * Onsemi MC1066
0439 
0440     Prefix: 'mc1066'
0441 
0442     Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e
0443 
0444     Datasheet: Publicly available at the Onsemi website
0445 
0446 Author: Jean Delvare <jdelvare@suse.de>
0447 
0448 
0449 Description
0450 -----------
0451 
0452 The LM90 is a digital temperature sensor. It senses its own temperature as
0453 well as the temperature of up to one external diode. It is compatible
0454 with many other devices, many of which are supported by this driver.
0455 
0456 The family of chips supported by this driver is derived from MAX1617.
0457 This chip as well as various compatible chips support a local and a remote
0458 temperature sensor with 8 bit accuracy. Later chips provide improved accuracy
0459 and other additional features such as hysteresis and temperature offset
0460 registers.
0461 
0462 Note that there is no easy way to differentiate between the MAX6657,
0463 MAX6658 and MAX6659 variants. The extra features of the MAX6659 are only
0464 supported by this driver if the chip is located at address 0x4d or 0x4e,
0465 or if the chip type is explicitly selected as max6659.
0466 The MAX6680 and MAX6681 only differ in their pinout, therefore they obviously
0467 can't (and don't need to) be distinguished.
0468 
0469 The different chipsets of the family are not strictly identical, although
0470 very similar. For reference, here comes a non-exhaustive list of specific
0471 features:
0472 
0473 LM84:
0474   * 8 bit sensor resolution
0475 
0476 ADM1020, ADM1021, GL523SM, MAX1617, NE1617, NE1617A, THMC10:
0477   * 8 bit sensor resolution
0478   * Low temperature limits
0479 
0480 NCT210, NE1618:
0481   * 11 bit sensor resolution for remote temperature sensor
0482   * Low temperature limits
0483 
0484 ADM1021A, ADM1023:
0485   * Temperature offset register for remote temperature sensor
0486   * 11 bit resolution for remote temperature sensor
0487   * Low temperature limits
0488 
0489 LM90:
0490   * 11 bit resolution for remote temperature sensor
0491   * Temperature offset register for remote temperature sensor
0492   * Low and critical temperature limits
0493   * Configurable conversion rate
0494   * Filter and alert configuration register at 0xBF.
0495   * ALERT is triggered by temperatures over critical limits.
0496 
0497 LM86 and LM89:
0498   * Same as LM90
0499   * Better external channel accuracy
0500 
0501 LM99:
0502   * Same as LM89
0503   * External temperature shifted by 16 degrees down
0504 
0505 ADM1032:
0506   * Consecutive alert register at 0x22.
0507   * Conversion averaging.
0508   * Up to 64 conversions/s.
0509   * ALERT is triggered by open remote sensor.
0510   * SMBus PEC support for Write Byte and Receive Byte transactions.
0511 
0512 ADT7461, ADT7461A, NCT1008:
0513   * Extended temperature range (breaks compatibility)
0514   * Lower resolution for remote temperature
0515   * SMBus PEC support for Write Byte and Receive Byte transactions.
0516   * 10 bit temperature resolution
0517 
0518 ADT7481, ADT7482, ADT7483:
0519   * Temperature offset register
0520   * SMBus PEC support
0521   * 10 bit temperature resolution for external sensors
0522   * Two remote sensors
0523   * Selectable address (ADT7483)
0524 
0525 MAX6642:
0526   * No critical limit register
0527   * Conversion rate not configurable
0528   * Better local resolution (10 bit)
0529   * 10 bit external sensor resolution
0530 
0531 MAX6646, MAX6647, MAX6649:
0532   * Better local resolution
0533   * Extended range unsigned external temperature
0534 
0535 MAX6648, MAX6692:
0536   * Better local resolution
0537   * Unsigned temperature
0538 
0539 MAX6654, MAX6690:
0540   * Better local resolution
0541   * Selectable address
0542   * Remote sensor type selection
0543   * Extended temperature range
0544   * Extended resolution only available when conversion rate <= 1 Hz
0545 
0546 MAX6657 and MAX6658:
0547   * Better local resolution
0548   * Remote sensor type selection
0549 
0550 MAX6659:
0551   * Better local resolution
0552   * Selectable address
0553   * Second critical temperature limit
0554   * Remote sensor type selection
0555 
0556 MAX6680 and MAX6681:
0557   * Selectable address
0558   * Remote sensor type selection
0559 
0560 MAX6695 and MAX6696:
0561   * Better local resolution
0562   * Selectable address (max6696)
0563   * Second critical temperature limit
0564   * Two remote sensors
0565 
0566 W83L771W/G
0567   * The G variant is lead-free, otherwise similar to the W.
0568   * Filter and alert configuration register at 0xBF
0569   * Moving average (depending on conversion rate)
0570 
0571 W83L771AWG/ASG
0572   * Successor of the W83L771W/G, same features.
0573   * The AWG and ASG variants only differ in package format.
0574   * Diode ideality factor configuration (remote sensor) at 0xE3
0575 
0576 SA56004X:
0577   * Better local resolution
0578 
0579 All temperature values are given in degrees Celsius. Resolution
0580 is 1.0 degree for the local temperature, 0.125 degree for the remote
0581 temperature, except for the MAX6654, MAX6657, MAX6658 and MAX6659 which have
0582 a resolution of 0.125 degree for both temperatures.
0583 
0584 Each sensor has its own high and low limits, plus a critical limit.
0585 Additionally, there is a relative hysteresis value common to both critical
0586 values. To make life easier to user-space applications, two absolute values
0587 are exported, one for each channel, but these values are of course linked.
0588 Only the local hysteresis can be set from user-space, and the same delta
0589 applies to the remote hysteresis.
0590 
0591 The lm90 driver will not update its values more frequently than configured with
0592 the update_interval attribute; reading them more often will do no harm, but will
0593 return 'old' values.
0594 
0595 SMBus Alert Support
0596 -------------------
0597 
0598 This driver has basic support for SMBus alert. When an alert is received,
0599 the status register is read and the faulty temperature channel is logged.
0600 
0601 The Analog Devices chips (ADM1032, ADT7461 and ADT7461A) and ON
0602 Semiconductor chips (NCT1008) do not implement the SMBus alert protocol
0603 properly so additional care is needed: the ALERT output is disabled when
0604 an alert is received, and is re-enabled only when the alarm is gone.
0605 Otherwise the chip would block alerts from other chips in the bus as long
0606 as the alarm is active.
0607 
0608 PEC Support
0609 -----------
0610 
0611 The ADM1032 is the only chip of the family which supports PEC. It does
0612 not support PEC on all transactions though, so some care must be taken.
0613 
0614 When reading a register value, the PEC byte is computed and sent by the
0615 ADM1032 chip. However, in the case of a combined transaction (SMBus Read
0616 Byte), the ADM1032 computes the CRC value over only the second half of
0617 the message rather than its entirety, because it thinks the first half
0618 of the message belongs to a different transaction. As a result, the CRC
0619 value differs from what the SMBus master expects, and all reads fail.
0620 
0621 For this reason, the lm90 driver will enable PEC for the ADM1032 only if
0622 the bus supports the SMBus Send Byte and Receive Byte transaction types.
0623 These transactions will be used to read register values, instead of
0624 SMBus Read Byte, and PEC will work properly.
0625 
0626 Additionally, the ADM1032 doesn't support SMBus Send Byte with PEC.
0627 Instead, it will try to write the PEC value to the register (because the
0628 SMBus Send Byte transaction with PEC is similar to a Write Byte transaction
0629 without PEC), which is not what we want. Thus, PEC is explicitly disabled
0630 on SMBus Send Byte transactions in the lm90 driver.
0631 
0632 PEC on byte data transactions represents a significant increase in bandwidth
0633 usage (+33% for writes, +25% for reads) in normal conditions. With the need
0634 to use two SMBus transaction for reads, this overhead jumps to +50%. Worse,
0635 two transactions will typically mean twice as much delay waiting for
0636 transaction completion, effectively doubling the register cache refresh time.
0637 I guess reliability comes at a price, but it's quite expensive this time.
0638 
0639 So, as not everyone might enjoy the slowdown, PEC is disabled by default and
0640 can be enabled through sysfs. Just write 1 to the "pec" file and PEC will be
0641 enabled. Write 0 to that file to disable PEC again.