lm73.rst 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. https://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. ============= ============= ============
  25. Resolution Conv. Time Input Range
  26. (C/LSB) (msec) (msec)
  27. ============= ============= ============
  28. 0.25 14 0..14
  29. 0.125 28 15..28
  30. 0.0625 56 29..56
  31. 0.03125 112 57..infinity
  32. ============= ============= ============
  33. The following examples show how the 'update_interval' attribute can be
  34. used to change the conversion time::
  35. $ echo 0 > update_interval
  36. $ cat update_interval
  37. 14
  38. $ cat temp1_input
  39. 24250
  40. $ echo 22 > update_interval
  41. $ cat update_interval
  42. 28
  43. $ cat temp1_input
  44. 24125
  45. $ echo 56 > update_interval
  46. $ cat update_interval
  47. 56
  48. $ cat temp1_input
  49. 24062
  50. $ echo 85 > update_interval
  51. $ cat update_interval
  52. 112
  53. $ cat temp1_input
  54. 24031
  55. As shown here, the lm73 driver automatically adjusts any user input for
  56. 'update_interval' via a step function. Reading back the
  57. 'update_interval' value after a write operation will confirm the
  58. conversion time actively in use.
  59. Mathematically, the resolution can be derived from the conversion time
  60. via the following function:
  61. g(x) = 0.250 * [log(x/14) / log(2)]
  62. where 'x' is the output from 'update_interval' and 'g(x)' is the
  63. resolution in degrees C per LSB.
  64. Alarm Support
  65. -------------
  66. The LM73 features a simple over-temperature alarm mechanism. This
  67. feature is exposed via the sysfs attributes.
  68. The attributes 'temp1_max_alarm' and 'temp1_min_alarm' are flags
  69. provided by the LM73 that indicate whether the measured temperature has
  70. passed the 'temp1_max' and 'temp1_min' thresholds, respectively. These
  71. values _must_ be read to clear the registers on the LM73.