xref: /OK3568_Linux_fs/kernel/Documentation/w1/slaves/w1_ds28e04.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun========================
2*4882a593SmuzhiyunKernel driver w1_ds28e04
3*4882a593Smuzhiyun========================
4*4882a593Smuzhiyun
5*4882a593SmuzhiyunSupported chips:
6*4882a593Smuzhiyun
7*4882a593Smuzhiyun  * Maxim DS28E04-100 4096-Bit Addressable 1-Wire EEPROM with PIO
8*4882a593Smuzhiyun
9*4882a593Smuzhiyunsupported family codes:
10*4882a593Smuzhiyun
11*4882a593Smuzhiyun        =================	====
12*4882a593Smuzhiyun	W1_FAMILY_DS28E04	0x1C
13*4882a593Smuzhiyun        =================	====
14*4882a593Smuzhiyun
15*4882a593SmuzhiyunAuthor: Markus Franke, <franke.m@sebakmt.com> <franm@hrz.tu-chemnitz.de>
16*4882a593Smuzhiyun
17*4882a593SmuzhiyunDescription
18*4882a593Smuzhiyun-----------
19*4882a593Smuzhiyun
20*4882a593SmuzhiyunSupport is provided through the sysfs files "eeprom" and "pio". CRC checking
21*4882a593Smuzhiyunduring memory accesses can optionally be enabled/disabled via the device
22*4882a593Smuzhiyunattribute "crccheck". The strong pull-up can optionally be enabled/disabled
23*4882a593Smuzhiyunvia the module parameter "w1_strong_pullup".
24*4882a593Smuzhiyun
25*4882a593SmuzhiyunMemory Access
26*4882a593Smuzhiyun
27*4882a593Smuzhiyun	A read operation on the "eeprom" file reads the given amount of bytes
28*4882a593Smuzhiyun	from the EEPROM of the DS28E04.
29*4882a593Smuzhiyun
30*4882a593Smuzhiyun	A write operation on the "eeprom" file writes the given byte sequence
31*4882a593Smuzhiyun	to the EEPROM of the DS28E04. If CRC checking mode is enabled only
32*4882a593Smuzhiyun	fully aligned blocks of 32 bytes with valid CRC16 values (in bytes 30
33*4882a593Smuzhiyun	and 31) are allowed to be written.
34*4882a593Smuzhiyun
35*4882a593SmuzhiyunPIO Access
36*4882a593Smuzhiyun
37*4882a593Smuzhiyun	The 2 PIOs of the DS28E04-100 are accessible via the "pio" sysfs file.
38*4882a593Smuzhiyun
39*4882a593Smuzhiyun	The current status of the PIO's is returned as an 8 bit value. Bit 0/1
40*4882a593Smuzhiyun	represent the state of PIO_0/PIO_1. Bits 2..7 do not care. The PIO's are
41*4882a593Smuzhiyun	driven low-active, i.e. the driver delivers/expects low-active values.
42