xref: /linux/Documentation/ABI/testing/sysfs-driver-w1_therm (revision e2c94d6f572079511945e64537eb1218643f2e68)
1*e2c94d6fSAkira ShimaharaWhat:		/sys/bus/w1/devices/.../alarms
2*e2c94d6fSAkira ShimaharaDate:		May 2020
3*e2c94d6fSAkira ShimaharaContact:	Akira Shimahara <akira215corp@gmail.com>
4*e2c94d6fSAkira ShimaharaDescription:
5*e2c94d6fSAkira Shimahara		(RW) read or write TH and TL (Temperature High an Low) alarms.
6*e2c94d6fSAkira Shimahara		Values shall be space separated and in the device range
7*e2c94d6fSAkira Shimahara		(typical -55 degC to 125 degC), if not values will be trimmed
8*e2c94d6fSAkira Shimahara		to device min/max capabilities. Values are integer as they are
9*e2c94d6fSAkira Shimahara		stored in a 8bit register in the device. Lowest value is
10*e2c94d6fSAkira Shimahara		automatically put to TL. Once set, alarms could be search at
11*e2c94d6fSAkira Shimahara		master level, refer to Documentation/w1/w1_generic.rst for
12*e2c94d6fSAkira Shimahara		detailed information
13*e2c94d6fSAkira ShimaharaUsers:		any user space application which wants to communicate with
14*e2c94d6fSAkira Shimahara		w1_term device
15*e2c94d6fSAkira Shimahara
16*e2c94d6fSAkira Shimahara
1745d457a4SAkira ShimaharaWhat:		/sys/bus/w1/devices/.../eeprom
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)
2545d457a4SAkira Shimahara			* 'save': save device RAM to EEPROM
2645d457a4SAkira Shimahara			* 'restore': restore EEPROM data in device RAM
2745d457a4SAkira ShimaharaUsers:		any user space application which wants to communicate with
2845d457a4SAkira Shimahara		w1_term device
2945d457a4SAkira Shimahara
3045d457a4SAkira Shimahara
31b7bb6ca1SAkira ShimaharaWhat:		/sys/bus/w1/devices/.../ext_power
32b7bb6ca1SAkira ShimaharaDate:		May 2020
33b7bb6ca1SAkira ShimaharaContact:	Akira Shimahara <akira215corp@gmail.com>
34b7bb6ca1SAkira ShimaharaDescription:
35b7bb6ca1SAkira Shimahara		(RO) return the power status by asking the device
36b7bb6ca1SAkira Shimahara			* '0': device parasite powered
37b7bb6ca1SAkira Shimahara			* '1': device externally powered
38b7bb6ca1SAkira Shimahara			* '-xx': xx is kernel error when reading power status
39b7bb6ca1SAkira ShimaharaUsers:		any user space application which wants to communicate with
40b7bb6ca1SAkira Shimahara		w1_term device
41b7bb6ca1SAkira Shimahara
42b7bb6ca1SAkira Shimahara
43308bdb94SAkira ShimaharaWhat:		/sys/bus/w1/devices/.../resolution
44308bdb94SAkira ShimaharaDate:		May 2020
45308bdb94SAkira ShimaharaContact:	Akira Shimahara <akira215corp@gmail.com>
46308bdb94SAkira ShimaharaDescription:
47308bdb94SAkira Shimahara		(RW) get or set the device resolution (on supported devices,
48308bdb94SAkira Shimahara		if not, this entry is not present). Note that the resolution
49308bdb94SAkira Shimahara		will be changed only in device RAM, so it will be cleared when
50308bdb94SAkira Shimahara		power is lost. Trigger a 'save' to EEPROM command to keep
51308bdb94SAkira Shimahara		values after power-on. Read or write are :
52308bdb94SAkira Shimahara			* '9..12': device resolution in bit
53308bdb94SAkira Shimahara			or resolution to set in bit
54308bdb94SAkira Shimahara			* '-xx': xx is kernel error when reading the resolution
55308bdb94SAkira Shimahara			* Anything else: do nothing
56308bdb94SAkira ShimaharaUsers:		any user space application which wants to communicate with
57308bdb94SAkira Shimahara		w1_term device
58308bdb94SAkira Shimahara
59308bdb94SAkira Shimahara
6067b392f7SAkira ShimaharaWhat:		/sys/bus/w1/devices/.../temperature
6167b392f7SAkira ShimaharaDate:		May 2020
6267b392f7SAkira ShimaharaContact:	Akira Shimahara <akira215corp@gmail.com>
6367b392f7SAkira ShimaharaDescription:
6467b392f7SAkira Shimahara		(RO) return the temperature in 1/1000 degC.
6567b392f7SAkira Shimahara		Note that the conversion duration depend on the resolution (if
6667b392f7SAkira Shimahara		device support this feature). It takes 94ms in 9bits
6767b392f7SAkira Shimahara		resolution, 750ms for 12bits.
6867b392f7SAkira ShimaharaUsers:		any user space application which wants to communicate with
6967b392f7SAkira Shimahara		w1_term device
7067b392f7SAkira Shimahara
7167b392f7SAkira Shimahara
72daa3cfebSAkira ShimaharaWhat:		/sys/bus/w1/devices/.../w1_slave
73daa3cfebSAkira ShimaharaDate:		May 2020
74daa3cfebSAkira ShimaharaContact:	Akira Shimahara <akira215corp@gmail.com>
75daa3cfebSAkira ShimaharaDescription:
76daa3cfebSAkira Shimahara		(RW) return the temperature in 1/1000 degC.
77daa3cfebSAkira Shimahara		*read*: return 2 lines with the hexa output data sent on the
78daa3cfebSAkira Shimahara		bus, return the CRC check and temperature in 1/1000 degC
79daa3cfebSAkira Shimahara		*write* :
80daa3cfebSAkira Shimahara			* '0' : save the 2 or 3 bytes to the device EEPROM
81daa3cfebSAkira Shimahara			(i.e. TH, TL and config register)
82daa3cfebSAkira Shimahara			* '9..12' : set the device resolution in RAM
83daa3cfebSAkira Shimahara			(if supported)
84daa3cfebSAkira Shimahara			* Anything else: do nothing
85daa3cfebSAkira Shimahara		refer to Documentation/w1/slaves/w1_therm.rst for detailed
86daa3cfebSAkira Shimahara		information.
87daa3cfebSAkira ShimaharaUsers:		any user space application which wants to communicate with
88daa3cfebSAkira Shimahara		w1_term device