1e2c94d6fSAkira ShimaharaWhat: /sys/bus/w1/devices/.../alarms 2e2c94d6fSAkira ShimaharaDate: May 2020 3e2c94d6fSAkira ShimaharaContact: Akira Shimahara <akira215corp@gmail.com> 4e2c94d6fSAkira ShimaharaDescription: 5e2c94d6fSAkira Shimahara (RW) read or write TH and TL (Temperature High an Low) alarms. 6e2c94d6fSAkira Shimahara Values shall be space separated and in the device range 7e2c94d6fSAkira Shimahara (typical -55 degC to 125 degC), if not values will be trimmed 8e2c94d6fSAkira Shimahara to device min/max capabilities. Values are integer as they are 9e2c94d6fSAkira Shimahara stored in a 8bit register in the device. Lowest value is 10e2c94d6fSAkira Shimahara automatically put to TL. Once set, alarms could be search at 11bbea2aa3SMauro Carvalho Chehab master level, refer to Documentation/w1/w1-generic.rst for 12e2c94d6fSAkira Shimahara detailed information 13e2c94d6fSAkira ShimaharaUsers: any user space application which wants to communicate with 14e2c94d6fSAkira Shimahara w1_term device 15e2c94d6fSAkira Shimahara 16e2c94d6fSAkira Shimahara 17*439e8f6fSIvan ZaentsevWhat: /sys/bus/w1/devices/.../eeprom_cmd 1845d457a4SAkira ShimaharaDate: May 2020 1945d457a4SAkira ShimaharaContact: Akira Shimahara <akira215corp@gmail.com> 2045d457a4SAkira ShimaharaDescription: 2145d457a4SAkira Shimahara (WO) writing that file will either trigger a save of the 2245d457a4SAkira Shimahara device data to its embedded EEPROM, either restore data 2345d457a4SAkira Shimahara embedded in device EEPROM. Be aware that devices support 2445d457a4SAkira Shimahara limited EEPROM writing cycles (typical 50k) 25002a9c2fSMauro Carvalho Chehab 2645d457a4SAkira Shimahara * 'save': save device RAM to EEPROM 2745d457a4SAkira Shimahara * 'restore': restore EEPROM data in device RAM 28002a9c2fSMauro Carvalho Chehab 2945d457a4SAkira ShimaharaUsers: any user space application which wants to communicate with 3045d457a4SAkira Shimahara w1_term device 3145d457a4SAkira Shimahara 3245d457a4SAkira Shimahara 33b7bb6ca1SAkira ShimaharaWhat: /sys/bus/w1/devices/.../ext_power 34b7bb6ca1SAkira ShimaharaDate: May 2020 35b7bb6ca1SAkira ShimaharaContact: Akira Shimahara <akira215corp@gmail.com> 36b7bb6ca1SAkira ShimaharaDescription: 37b7bb6ca1SAkira Shimahara (RO) return the power status by asking the device 38002a9c2fSMauro Carvalho Chehab 39b7bb6ca1SAkira Shimahara * '0': device parasite powered 40b7bb6ca1SAkira Shimahara * '1': device externally powered 41b7bb6ca1SAkira Shimahara * '-xx': xx is kernel error when reading power status 42002a9c2fSMauro Carvalho Chehab 43b7bb6ca1SAkira ShimaharaUsers: any user space application which wants to communicate with 44b7bb6ca1SAkira Shimahara w1_term device 45b7bb6ca1SAkira Shimahara 46b7bb6ca1SAkira Shimahara 47308bdb94SAkira ShimaharaWhat: /sys/bus/w1/devices/.../resolution 48308bdb94SAkira ShimaharaDate: May 2020 49308bdb94SAkira ShimaharaContact: Akira Shimahara <akira215corp@gmail.com> 50308bdb94SAkira ShimaharaDescription: 51308bdb94SAkira Shimahara (RW) get or set the device resolution (on supported devices, 52308bdb94SAkira Shimahara if not, this entry is not present). Note that the resolution 53308bdb94SAkira Shimahara will be changed only in device RAM, so it will be cleared when 54308bdb94SAkira Shimahara power is lost. Trigger a 'save' to EEPROM command to keep 55308bdb94SAkira Shimahara values after power-on. Read or write are : 56002a9c2fSMauro Carvalho Chehab 579ace0b4dSIvan Zaentsev * '9..14': device resolution in bit 58308bdb94SAkira Shimahara or resolution to set in bit 59308bdb94SAkira Shimahara * '-xx': xx is kernel error when reading the resolution 60308bdb94SAkira Shimahara * Anything else: do nothing 61002a9c2fSMauro Carvalho Chehab 62021da53eSIvan Zaentsev Some DS18B20 clones are fixed in 12-bit resolution, so the 63021da53eSIvan Zaentsev actual resolution is read back from the chip and verified. Error 64021da53eSIvan Zaentsev is reported if the results differ. 65308bdb94SAkira ShimaharaUsers: any user space application which wants to communicate with 66308bdb94SAkira Shimahara w1_term device 67308bdb94SAkira Shimahara 68308bdb94SAkira Shimahara 6967b392f7SAkira ShimaharaWhat: /sys/bus/w1/devices/.../temperature 7067b392f7SAkira ShimaharaDate: May 2020 7167b392f7SAkira ShimaharaContact: Akira Shimahara <akira215corp@gmail.com> 7267b392f7SAkira ShimaharaDescription: 7367b392f7SAkira Shimahara (RO) return the temperature in 1/1000 degC. 74002a9c2fSMauro Carvalho Chehab 7557c76221SAkira Shimahara * If a bulk read has been triggered, it will directly 7657c76221SAkira Shimahara return the temperature computed when the bulk read 7757c76221SAkira Shimahara occurred, if available. If not yet available, nothing 7857c76221SAkira Shimahara is returned (a debug kernel message is sent), you 7957c76221SAkira Shimahara should retry later on. 8057c76221SAkira Shimahara * If no bulk read has been triggered, it will trigger 8157c76221SAkira Shimahara a conversion and send the result. Note that the 8257c76221SAkira Shimahara conversion duration depend on the resolution (if 8367b392f7SAkira Shimahara device support this feature). It takes 94ms in 9bits 8467b392f7SAkira Shimahara resolution, 750ms for 12bits. 85002a9c2fSMauro Carvalho Chehab 8667b392f7SAkira ShimaharaUsers: any user space application which wants to communicate with 8767b392f7SAkira Shimahara w1_term device 8867b392f7SAkira Shimahara 8967b392f7SAkira Shimahara 90daa3cfebSAkira ShimaharaWhat: /sys/bus/w1/devices/.../w1_slave 91daa3cfebSAkira ShimaharaDate: May 2020 92daa3cfebSAkira ShimaharaContact: Akira Shimahara <akira215corp@gmail.com> 93daa3cfebSAkira ShimaharaDescription: 94daa3cfebSAkira Shimahara (RW) return the temperature in 1/1000 degC. 95daa3cfebSAkira Shimahara *read*: return 2 lines with the hexa output data sent on the 96daa3cfebSAkira Shimahara bus, return the CRC check and temperature in 1/1000 degC 97daa3cfebSAkira Shimahara *write*: 98002a9c2fSMauro Carvalho Chehab 99daa3cfebSAkira Shimahara * '0' : save the 2 or 3 bytes to the device EEPROM 100daa3cfebSAkira Shimahara (i.e. TH, TL and config register) 1019ace0b4dSIvan Zaentsev * '9..14' : set the device resolution in RAM 102daa3cfebSAkira Shimahara (if supported) 103daa3cfebSAkira Shimahara * Anything else: do nothing 104002a9c2fSMauro Carvalho Chehab 105daa3cfebSAkira Shimahara refer to Documentation/w1/slaves/w1_therm.rst for detailed 106daa3cfebSAkira Shimahara information. 107daa3cfebSAkira ShimaharaUsers: any user space application which wants to communicate with 108daa3cfebSAkira Shimahara w1_term device 10957c76221SAkira Shimahara 11057c76221SAkira Shimahara 11157c76221SAkira ShimaharaWhat: /sys/bus/w1/devices/w1_bus_masterXX/therm_bulk_read 11257c76221SAkira ShimaharaDate: May 2020 11357c76221SAkira ShimaharaContact: Akira Shimahara <akira215corp@gmail.com> 11457c76221SAkira ShimaharaDescription: 11557c76221SAkira Shimahara (RW) trigger a bulk read conversion. read the status 116002a9c2fSMauro Carvalho Chehab 11757c76221SAkira Shimahara *read*: 118002a9c2fSMauro Carvalho Chehab * '-1': 119002a9c2fSMauro Carvalho Chehab conversion in progress on at least 1 sensor 120002a9c2fSMauro Carvalho Chehab * '1' : 121002a9c2fSMauro Carvalho Chehab conversion complete but at least one sensor 12257c76221SAkira Shimahara value has not been read yet 123002a9c2fSMauro Carvalho Chehab * '0' : 124002a9c2fSMauro Carvalho Chehab no bulk operation. Reading temperature will 12557c76221SAkira Shimahara trigger a conversion on each device 126002a9c2fSMauro Carvalho Chehab 127002a9c2fSMauro Carvalho Chehab *write*: 128002a9c2fSMauro Carvalho Chehab 'trigger': trigger a bulk read on all supporting 12957c76221SAkira Shimahara devices on the bus 130002a9c2fSMauro Carvalho Chehab 13157c76221SAkira Shimahara Note that if a bulk read is sent but one sensor is not read 13257c76221SAkira Shimahara immediately, the next access to temperature on this device 13357c76221SAkira Shimahara will return the temperature measured at the time of issue 13457c76221SAkira Shimahara of the bulk read command (not the current temperature). 13557c76221SAkira ShimaharaUsers: any user space application which wants to communicate with 13657c76221SAkira Shimahara w1_term device 137021da53eSIvan Zaentsev 138021da53eSIvan Zaentsev 139021da53eSIvan ZaentsevWhat: /sys/bus/w1/devices/.../conv_time 140021da53eSIvan ZaentsevDate: July 2020 141021da53eSIvan ZaentsevContact: Ivan Zaentsev <ivan.zaentsev@wirenboard.ru> 142021da53eSIvan ZaentsevDescription: 143021da53eSIvan Zaentsev (RW) Get, set, or measure a temperature conversion time. The 144021da53eSIvan Zaentsev setting remains active until a resolution change. Then it is 145021da53eSIvan Zaentsev reset to default (datasheet) conversion time for a new 146021da53eSIvan Zaentsev resolution. 147021da53eSIvan Zaentsev 148002a9c2fSMauro Carvalho Chehab *read*: 149002a9c2fSMauro Carvalho Chehab Actual conversion time in milliseconds. 150002a9c2fSMauro Carvalho Chehab 151002a9c2fSMauro Carvalho Chehab *write*: 152002a9c2fSMauro Carvalho Chehab * '0': 153002a9c2fSMauro Carvalho Chehab Set the default conversion time from the datasheet. 154002a9c2fSMauro Carvalho Chehab * '1': 155002a9c2fSMauro Carvalho Chehab Measure and set the conversion time. Make a single 156021da53eSIvan Zaentsev temperature conversion, measure an actual value. 157021da53eSIvan Zaentsev Increase it by 20% for temperature range. A new 158021da53eSIvan Zaentsev conversion time can be obtained by reading this 159021da53eSIvan Zaentsev same attribute. 160002a9c2fSMauro Carvalho Chehab * other positive value: 161021da53eSIvan Zaentsev Set the conversion time in milliseconds. 162021da53eSIvan Zaentsev 163021da53eSIvan ZaentsevUsers: An application using the w1_term device 164021da53eSIvan Zaentsev 165021da53eSIvan Zaentsev 166021da53eSIvan ZaentsevWhat: /sys/bus/w1/devices/.../features 167021da53eSIvan ZaentsevDate: July 2020 168021da53eSIvan ZaentsevContact: Ivan Zaentsev <ivan.zaentsev@wirenboard.ru> 169021da53eSIvan ZaentsevDescription: 170021da53eSIvan Zaentsev (RW) Control optional driver settings. 17178eef5d9SIvan Zaentsev Bit masks to read/write (bitwise OR): 172021da53eSIvan Zaentsev 173002a9c2fSMauro Carvalho Chehab == ============================================================ 174002a9c2fSMauro Carvalho Chehab 1 Enable check for conversion success. If byte 6 of 175021da53eSIvan Zaentsev scratchpad memory is 0xC after conversion, and 176021da53eSIvan Zaentsev temperature reads 85.00 (powerup value) or 127.94 177021da53eSIvan Zaentsev (insufficient power) - return a conversion error. 178021da53eSIvan Zaentsev 179002a9c2fSMauro Carvalho Chehab 2 Enable poll for conversion completion. Generate read cycles 180021da53eSIvan Zaentsev after the conversion start and wait for 1's. In parasite 181021da53eSIvan Zaentsev power mode this feature is not available. 182002a9c2fSMauro Carvalho Chehab == ============================================================ 183021da53eSIvan Zaentsev 184002a9c2fSMauro Carvalho Chehab *read*: 185002a9c2fSMauro Carvalho Chehab Currently selected features. 186002a9c2fSMauro Carvalho Chehab 187002a9c2fSMauro Carvalho Chehab *write*: 188002a9c2fSMauro Carvalho Chehab Select features. 189021da53eSIvan Zaentsev 190021da53eSIvan ZaentsevUsers: An application using the w1_term device 191