lm73 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. Kernel driver lm73
  2. ==================
  3. Supported chips:
  4. * Texas Instruments LM73
  5. Prefix: 'lm73'
  6. Addresses scanned: I2C 0x48, 0x49, 0x4a, 0x4c, 0x4d, and 0x4e
  7. Datasheet: Publicly available at the Texas Instruments website
  8. http://www.ti.com/product/lm73
  9. Author: Guillaume Ligneul <guillaume.ligneul@gmail.com>
  10. Documentation: Chris Verges <kg4ysn@gmail.com>
  11. Description
  12. -----------
  13. The LM73 is a digital temperature sensor. All temperature values are
  14. given in degrees Celsius.
  15. Measurement Resolution Support
  16. ------------------------------
  17. The LM73 supports four resolutions, defined in terms of degrees C per
  18. LSB: 0.25, 0.125, 0.0625, and 0.3125. Changing the resolution mode
  19. affects the conversion time of the LM73's analog-to-digital converter.
  20. From userspace, the desired resolution can be specified as a function of
  21. conversion time via the 'update_interval' sysfs attribute for the
  22. device. This attribute will normalize ranges of input values to the
  23. maximum times defined for the resolution in the datasheet.
  24. Resolution Conv. Time Input Range
  25. (C/LSB) (msec) (msec)
  26. --------------------------------------
  27. 0.25 14 0..14
  28. 0.125 28 15..28
  29. 0.0625 56 29..56
  30. 0.03125 112 57..infinity
  31. --------------------------------------
  32. The following examples show how the 'update_interval' attribute can be
  33. used to change the conversion time:
  34. $ echo 0 > update_interval
  35. $ cat update_interval
  36. 14
  37. $ cat temp1_input
  38. 24250
  39. $ echo 22 > update_interval
  40. $ cat update_interval
  41. 28
  42. $ cat temp1_input
  43. 24125
  44. $ echo 56 > update_interval
  45. $ cat update_interval
  46. 56
  47. $ cat temp1_input
  48. 24062
  49. $ echo 85 > update_interval
  50. $ cat update_interval
  51. 112
  52. $ cat temp1_input
  53. 24031
  54. As shown here, the lm73 driver automatically adjusts any user input for
  55. 'update_interval' via a step function. Reading back the
  56. 'update_interval' value after a write operation will confirm the
  57. conversion time actively in use.
  58. Mathematically, the resolution can be derived from the conversion time
  59. via the following function:
  60. g(x) = 0.250 * [log(x/14) / log(2)]
  61. where 'x' is the output from 'update_interval' and 'g(x)' is the
  62. resolution in degrees C per LSB.
  63. Alarm Support
  64. -------------
  65. The LM73 features a simple over-temperature alarm mechanism. This
  66. feature is exposed via the sysfs attributes.
  67. The attributes 'temp1_max_alarm' and 'temp1_min_alarm' are flags
  68. provided by the LM73 that indicate whether the measured temperature has
  69. passed the 'temp1_max' and 'temp1_min' thresholds, respectively. These
  70. values _must_ be read to clear the registers on the LM73.