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