sysfs-driver-w1_therm 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. What: /sys/bus/w1/devices/.../alarms
  2. Date: May 2020
  3. Contact: Akira Shimahara <akira215corp@gmail.com>
  4. Description:
  5. (RW) read or write TH and TL (Temperature High an Low) alarms.
  6. Values shall be space separated and in the device range
  7. (typical -55 degC to 125 degC), if not values will be trimmed
  8. to device min/max capabilities. Values are integer as they are
  9. stored in a 8bit register in the device. Lowest value is
  10. automatically put to TL. Once set, alarms could be search at
  11. master level, refer to Documentation/w1/w1-generic.rst for
  12. detailed information
  13. Users: any user space application which wants to communicate with
  14. w1_term device
  15. What: /sys/bus/w1/devices/.../eeprom
  16. Date: May 2020
  17. Contact: Akira Shimahara <akira215corp@gmail.com>
  18. Description:
  19. (WO) writing that file will either trigger a save of the
  20. device data to its embedded EEPROM, either restore data
  21. embedded in device EEPROM. Be aware that devices support
  22. limited EEPROM writing cycles (typical 50k)
  23. * 'save': save device RAM to EEPROM
  24. * 'restore': restore EEPROM data in device RAM
  25. Users: any user space application which wants to communicate with
  26. w1_term device
  27. What: /sys/bus/w1/devices/.../ext_power
  28. Date: May 2020
  29. Contact: Akira Shimahara <akira215corp@gmail.com>
  30. Description:
  31. (RO) return the power status by asking the device
  32. * '0': device parasite powered
  33. * '1': device externally powered
  34. * '-xx': xx is kernel error when reading power status
  35. Users: any user space application which wants to communicate with
  36. w1_term device
  37. What: /sys/bus/w1/devices/.../resolution
  38. Date: May 2020
  39. Contact: Akira Shimahara <akira215corp@gmail.com>
  40. Description:
  41. (RW) get or set the device resolution (on supported devices,
  42. if not, this entry is not present). Note that the resolution
  43. will be changed only in device RAM, so it will be cleared when
  44. power is lost. Trigger a 'save' to EEPROM command to keep
  45. values after power-on. Read or write are :
  46. * '9..14': device resolution in bit
  47. or resolution to set in bit
  48. * '-xx': xx is kernel error when reading the resolution
  49. * Anything else: do nothing
  50. Some DS18B20 clones are fixed in 12-bit resolution, so the
  51. actual resolution is read back from the chip and verified. Error
  52. is reported if the results differ.
  53. Users: any user space application which wants to communicate with
  54. w1_term device
  55. What: /sys/bus/w1/devices/.../temperature
  56. Date: May 2020
  57. Contact: Akira Shimahara <akira215corp@gmail.com>
  58. Description:
  59. (RO) return the temperature in 1/1000 degC.
  60. * If a bulk read has been triggered, it will directly
  61. return the temperature computed when the bulk read
  62. occurred, if available. If not yet available, nothing
  63. is returned (a debug kernel message is sent), you
  64. should retry later on.
  65. * If no bulk read has been triggered, it will trigger
  66. a conversion and send the result. Note that the
  67. conversion duration depend on the resolution (if
  68. device support this feature). It takes 94ms in 9bits
  69. resolution, 750ms for 12bits.
  70. Users: any user space application which wants to communicate with
  71. w1_term device
  72. What: /sys/bus/w1/devices/.../w1_slave
  73. Date: May 2020
  74. Contact: Akira Shimahara <akira215corp@gmail.com>
  75. Description:
  76. (RW) return the temperature in 1/1000 degC.
  77. *read*: return 2 lines with the hexa output data sent on the
  78. bus, return the CRC check and temperature in 1/1000 degC
  79. *write*:
  80. * '0' : save the 2 or 3 bytes to the device EEPROM
  81. (i.e. TH, TL and config register)
  82. * '9..14' : set the device resolution in RAM
  83. (if supported)
  84. * Anything else: do nothing
  85. refer to Documentation/w1/slaves/w1_therm.rst for detailed
  86. information.
  87. Users: any user space application which wants to communicate with
  88. w1_term device
  89. What: /sys/bus/w1/devices/w1_bus_masterXX/therm_bulk_read
  90. Date: May 2020
  91. Contact: Akira Shimahara <akira215corp@gmail.com>
  92. Description:
  93. (RW) trigger a bulk read conversion. read the status
  94. *read*:
  95. * '-1':
  96. conversion in progress on at least 1 sensor
  97. * '1' :
  98. conversion complete but at least one sensor
  99. value has not been read yet
  100. * '0' :
  101. no bulk operation. Reading temperature will
  102. trigger a conversion on each device
  103. *write*:
  104. 'trigger': trigger a bulk read on all supporting
  105. devices on the bus
  106. Note that if a bulk read is sent but one sensor is not read
  107. immediately, the next access to temperature on this device
  108. will return the temperature measured at the time of issue
  109. of the bulk read command (not the current temperature).
  110. Users: any user space application which wants to communicate with
  111. w1_term device
  112. What: /sys/bus/w1/devices/.../conv_time
  113. Date: July 2020
  114. Contact: Ivan Zaentsev <ivan.zaentsev@wirenboard.ru>
  115. Description:
  116. (RW) Get, set, or measure a temperature conversion time. The
  117. setting remains active until a resolution change. Then it is
  118. reset to default (datasheet) conversion time for a new
  119. resolution.
  120. *read*:
  121. Actual conversion time in milliseconds.
  122. *write*:
  123. * '0':
  124. Set the default conversion time from the datasheet.
  125. * '1':
  126. Measure and set the conversion time. Make a single
  127. temperature conversion, measure an actual value.
  128. Increase it by 20% for temperature range. A new
  129. conversion time can be obtained by reading this
  130. same attribute.
  131. * other positive value:
  132. Set the conversion time in milliseconds.
  133. Users: An application using the w1_term device
  134. What: /sys/bus/w1/devices/.../features
  135. Date: July 2020
  136. Contact: Ivan Zaentsev <ivan.zaentsev@wirenboard.ru>
  137. Description:
  138. (RW) Control optional driver settings.
  139. Bit masks to read/write (bitwise OR):
  140. == ============================================================
  141. 1 Enable check for conversion success. If byte 6 of
  142. scratchpad memory is 0xC after conversion, and
  143. temperature reads 85.00 (powerup value) or 127.94
  144. (insufficient power) - return a conversion error.
  145. 2 Enable poll for conversion completion. Generate read cycles
  146. after the conversion start and wait for 1's. In parasite
  147. power mode this feature is not available.
  148. == ============================================================
  149. *read*:
  150. Currently selected features.
  151. *write*:
  152. Select features.
  153. Users: An application using the w1_term device