lm90 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. Kernel driver lm90
  2. ==================
  3. Supported chips:
  4. * National Semiconductor LM90
  5. Prefix: 'lm90'
  6. Addresses scanned: I2C 0x4c
  7. Datasheet: Publicly available at the National Semiconductor website
  8. http://www.national.com/pf/LM/LM90.html
  9. * National Semiconductor LM89
  10. Prefix: 'lm99'
  11. Addresses scanned: I2C 0x4c and 0x4d
  12. Datasheet: Publicly available at the National Semiconductor website
  13. http://www.national.com/pf/LM/LM89.html
  14. * National Semiconductor LM99
  15. Prefix: 'lm99'
  16. Addresses scanned: I2C 0x4c and 0x4d
  17. Datasheet: Publicly available at the National Semiconductor website
  18. http://www.national.com/pf/LM/LM99.html
  19. * National Semiconductor LM86
  20. Prefix: 'lm86'
  21. Addresses scanned: I2C 0x4c
  22. Datasheet: Publicly available at the National Semiconductor website
  23. http://www.national.com/pf/LM/LM86.html
  24. * Analog Devices ADM1032
  25. Prefix: 'adm1032'
  26. Addresses scanned: I2C 0x4c and 0x4d
  27. Datasheet: Publicly available at the Analog Devices website
  28. http://www.analog.com/en/prod/0,2877,ADM1032,00.html
  29. * Analog Devices ADT7461
  30. Prefix: 'adt7461'
  31. Addresses scanned: I2C 0x4c and 0x4d
  32. Datasheet: Publicly available at the Analog Devices website
  33. http://www.analog.com/en/prod/0,2877,ADT7461,00.html
  34. Note: Only if in ADM1032 compatibility mode
  35. * Maxim MAX6657
  36. Prefix: 'max6657'
  37. Addresses scanned: I2C 0x4c
  38. Datasheet: Publicly available at the Maxim website
  39. http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578
  40. * Maxim MAX6658
  41. Prefix: 'max6657'
  42. Addresses scanned: I2C 0x4c
  43. Datasheet: Publicly available at the Maxim website
  44. http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578
  45. * Maxim MAX6659
  46. Prefix: 'max6657'
  47. Addresses scanned: I2C 0x4c, 0x4d (unsupported 0x4e)
  48. Datasheet: Publicly available at the Maxim website
  49. http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578
  50. * Maxim MAX6680
  51. Prefix: 'max6680'
  52. Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,
  53. 0x4c, 0x4d and 0x4e
  54. Datasheet: Publicly available at the Maxim website
  55. http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3370
  56. * Maxim MAX6681
  57. Prefix: 'max6680'
  58. Addresses scanned: I2C 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b,
  59. 0x4c, 0x4d and 0x4e
  60. Datasheet: Publicly available at the Maxim website
  61. http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3370
  62. Author: Jean Delvare <khali@linux-fr.org>
  63. Description
  64. -----------
  65. The LM90 is a digital temperature sensor. It senses its own temperature as
  66. well as the temperature of up to one external diode. It is compatible
  67. with many other devices such as the LM86, the LM89, the LM99, the ADM1032,
  68. the MAX6657, MAX6658, MAX6659, MAX6680 and the MAX6681 all of which are
  69. supported by this driver.
  70. Note that there is no easy way to differentiate between the MAX6657,
  71. MAX6658 and MAX6659 variants. The extra address and features of the
  72. MAX6659 are not supported by this driver. The MAX6680 and MAX6681 only
  73. differ in their pinout, therefore they obviously can't (and don't need to)
  74. be distinguished. Additionally, the ADT7461 is supported if found in
  75. ADM1032 compatibility mode.
  76. The specificity of this family of chipsets over the ADM1021/LM84
  77. family is that it features critical limits with hysteresis, and an
  78. increased resolution of the remote temperature measurement.
  79. The different chipsets of the family are not strictly identical, although
  80. very similar. This driver doesn't handle any specific feature for now,
  81. with the exception of SMBus PEC. For reference, here comes a non-exhaustive
  82. list of specific features:
  83. LM90:
  84. * Filter and alert configuration register at 0xBF.
  85. * ALERT is triggered by temperatures over critical limits.
  86. LM86 and LM89:
  87. * Same as LM90
  88. * Better external channel accuracy
  89. LM99:
  90. * Same as LM89
  91. * External temperature shifted by 16 degrees down
  92. ADM1032:
  93. * Consecutive alert register at 0x22.
  94. * Conversion averaging.
  95. * Up to 64 conversions/s.
  96. * ALERT is triggered by open remote sensor.
  97. * SMBus PEC support for Write Byte and Receive Byte transactions.
  98. ADT7461:
  99. * Extended temperature range (breaks compatibility)
  100. * Lower resolution for remote temperature
  101. MAX6657 and MAX6658:
  102. * Remote sensor type selection
  103. MAX6659:
  104. * Selectable address
  105. * Second critical temperature limit
  106. * Remote sensor type selection
  107. MAX6680 and MAX6681:
  108. * Selectable address
  109. * Remote sensor type selection
  110. All temperature values are given in degrees Celsius. Resolution
  111. is 1.0 degree for the local temperature, 0.125 degree for the remote
  112. temperature.
  113. Each sensor has its own high and low limits, plus a critical limit.
  114. Additionally, there is a relative hysteresis value common to both critical
  115. values. To make life easier to user-space applications, two absolute values
  116. are exported, one for each channel, but these values are of course linked.
  117. Only the local hysteresis can be set from user-space, and the same delta
  118. applies to the remote hysteresis.
  119. The lm90 driver will not update its values more frequently than every
  120. other second; reading them more often will do no harm, but will return
  121. 'old' values.
  122. PEC Support
  123. -----------
  124. The ADM1032 is the only chip of the family which supports PEC. It does
  125. not support PEC on all transactions though, so some care must be taken.
  126. When reading a register value, the PEC byte is computed and sent by the
  127. ADM1032 chip. However, in the case of a combined transaction (SMBus Read
  128. Byte), the ADM1032 computes the CRC value over only the second half of
  129. the message rather than its entirety, because it thinks the first half
  130. of the message belongs to a different transaction. As a result, the CRC
  131. value differs from what the SMBus master expects, and all reads fail.
  132. For this reason, the lm90 driver will enable PEC for the ADM1032 only if
  133. the bus supports the SMBus Send Byte and Receive Byte transaction types.
  134. These transactions will be used to read register values, instead of
  135. SMBus Read Byte, and PEC will work properly.
  136. Additionally, the ADM1032 doesn't support SMBus Send Byte with PEC.
  137. Instead, it will try to write the PEC value to the register (because the
  138. SMBus Send Byte transaction with PEC is similar to a Write Byte transaction
  139. without PEC), which is not what we want. Thus, PEC is explicitly disabled
  140. on SMBus Send Byte transactions in the lm90 driver.
  141. PEC on byte data transactions represents a significant increase in bandwidth
  142. usage (+33% for writes, +25% for reads) in normal conditions. With the need
  143. to use two SMBus transaction for reads, this overhead jumps to +50%. Worse,
  144. two transactions will typically mean twice as much delay waiting for
  145. transaction completion, effectively doubling the register cache refresh time.
  146. I guess reliability comes at a price, but it's quite expensive this time.
  147. So, as not everyone might enjoy the slowdown, PEC can be disabled through
  148. sysfs. Just write 0 to the "pec" file and PEC will be disabled. Write 1
  149. to that file to enable PEC again.