0001 What: /sys/bus/w1/devices/.../alarms
0002 Date: May 2020
0003 Contact: Akira Shimahara <akira215corp@gmail.com>
0004 Description:
0005 (RW) read or write TH and TL (Temperature High an Low) alarms.
0006 Values shall be space separated and in the device range
0007 (typical -55 degC to 125 degC), if not values will be trimmed
0008 to device min/max capabilities. Values are integer as they are
0009 stored in a 8bit register in the device. Lowest value is
0010 automatically put to TL. Once set, alarms could be search at
0011 master level, refer to Documentation/w1/w1-generic.rst for
0012 detailed information
0013 Users: any user space application which wants to communicate with
0014 w1_term device
0015
0016
0017 What: /sys/bus/w1/devices/.../eeprom_cmd
0018 Date: May 2020
0019 Contact: Akira Shimahara <akira215corp@gmail.com>
0020 Description:
0021 (WO) writing that file will either trigger a save of the
0022 device data to its embedded EEPROM, either restore data
0023 embedded in device EEPROM. Be aware that devices support
0024 limited EEPROM writing cycles (typical 50k)
0025
0026 * 'save': save device RAM to EEPROM
0027 * 'restore': restore EEPROM data in device RAM
0028
0029 Users: any user space application which wants to communicate with
0030 w1_term device
0031
0032
0033 What: /sys/bus/w1/devices/.../ext_power
0034 Date: May 2020
0035 Contact: Akira Shimahara <akira215corp@gmail.com>
0036 Description:
0037 (RO) return the power status by asking the device
0038
0039 * '0': device parasite powered
0040 * '1': device externally powered
0041 * '-xx': xx is kernel error when reading power status
0042
0043 Users: any user space application which wants to communicate with
0044 w1_term device
0045
0046
0047 What: /sys/bus/w1/devices/.../resolution
0048 Date: May 2020
0049 Contact: Akira Shimahara <akira215corp@gmail.com>
0050 Description:
0051 (RW) get or set the device resolution (on supported devices,
0052 if not, this entry is not present). Note that the resolution
0053 will be changed only in device RAM, so it will be cleared when
0054 power is lost. Trigger a 'save' to EEPROM command to keep
0055 values after power-on. Read or write are :
0056
0057 * '9..14': device resolution in bit
0058 or resolution to set in bit
0059 * '-xx': xx is kernel error when reading the resolution
0060 * Anything else: do nothing
0061
0062 Some DS18B20 clones are fixed in 12-bit resolution, so the
0063 actual resolution is read back from the chip and verified. Error
0064 is reported if the results differ.
0065 Users: any user space application which wants to communicate with
0066 w1_term device
0067
0068
0069 What: /sys/bus/w1/devices/.../temperature
0070 Date: May 2020
0071 Contact: Akira Shimahara <akira215corp@gmail.com>
0072 Description:
0073 (RO) return the temperature in 1/1000 degC.
0074
0075 * If a bulk read has been triggered, it will directly
0076 return the temperature computed when the bulk read
0077 occurred, if available. If not yet available, nothing
0078 is returned (a debug kernel message is sent), you
0079 should retry later on.
0080 * If no bulk read has been triggered, it will trigger
0081 a conversion and send the result. Note that the
0082 conversion duration depend on the resolution (if
0083 device support this feature). It takes 94ms in 9bits
0084 resolution, 750ms for 12bits.
0085
0086 Users: any user space application which wants to communicate with
0087 w1_term device
0088
0089
0090 What: /sys/bus/w1/devices/.../w1_slave
0091 Date: May 2020
0092 Contact: Akira Shimahara <akira215corp@gmail.com>
0093 Description:
0094 (RW) return the temperature in 1/1000 degC.
0095 *read*: return 2 lines with the hexa output data sent on the
0096 bus, return the CRC check and temperature in 1/1000 degC
0097 *write*:
0098
0099 * '0' : save the 2 or 3 bytes to the device EEPROM
0100 (i.e. TH, TL and config register)
0101 * '9..14' : set the device resolution in RAM
0102 (if supported)
0103 * Anything else: do nothing
0104
0105 refer to Documentation/w1/slaves/w1_therm.rst for detailed
0106 information.
0107 Users: any user space application which wants to communicate with
0108 w1_term device
0109
0110
0111 What: /sys/bus/w1/devices/w1_bus_masterXX/therm_bulk_read
0112 Date: May 2020
0113 Contact: Akira Shimahara <akira215corp@gmail.com>
0114 Description:
0115 (RW) trigger a bulk read conversion. read the status
0116
0117 *read*:
0118 * '-1':
0119 conversion in progress on at least 1 sensor
0120 * '1' :
0121 conversion complete but at least one sensor
0122 value has not been read yet
0123 * '0' :
0124 no bulk operation. Reading temperature will
0125 trigger a conversion on each device
0126
0127 *write*:
0128 'trigger': trigger a bulk read on all supporting
0129 devices on the bus
0130
0131 Note that if a bulk read is sent but one sensor is not read
0132 immediately, the next access to temperature on this device
0133 will return the temperature measured at the time of issue
0134 of the bulk read command (not the current temperature).
0135 Users: any user space application which wants to communicate with
0136 w1_term device
0137
0138
0139 What: /sys/bus/w1/devices/.../conv_time
0140 Date: July 2020
0141 Contact: Ivan Zaentsev <ivan.zaentsev@wirenboard.ru>
0142 Description:
0143 (RW) Get, set, or measure a temperature conversion time. The
0144 setting remains active until a resolution change. Then it is
0145 reset to default (datasheet) conversion time for a new
0146 resolution.
0147
0148 *read*:
0149 Actual conversion time in milliseconds.
0150
0151 *write*:
0152 * '0':
0153 Set the default conversion time from the datasheet.
0154 * '1':
0155 Measure and set the conversion time. Make a single
0156 temperature conversion, measure an actual value.
0157 Increase it by 20% for temperature range. A new
0158 conversion time can be obtained by reading this
0159 same attribute.
0160 * other positive value:
0161 Set the conversion time in milliseconds.
0162
0163 Users: An application using the w1_term device
0164
0165
0166 What: /sys/bus/w1/devices/.../features
0167 Date: July 2020
0168 Contact: Ivan Zaentsev <ivan.zaentsev@wirenboard.ru>
0169 Description:
0170 (RW) Control optional driver settings.
0171 Bit masks to read/write (bitwise OR):
0172
0173 == ============================================================
0174 1 Enable check for conversion success. If byte 6 of
0175 scratchpad memory is 0xC after conversion, and
0176 temperature reads 85.00 (powerup value) or 127.94
0177 (insufficient power) - return a conversion error.
0178
0179 2 Enable poll for conversion completion. Generate read cycles
0180 after the conversion start and wait for 1's. In parasite
0181 power mode this feature is not available.
0182 == ============================================================
0183
0184 *read*:
0185 Currently selected features.
0186
0187 *write*:
0188 Select features.
0189
0190 Users: An application using the w1_term device