1 =======================
2 Kernel driver w1_ds2413
3 =======================
7 * Maxim DS2413 1-Wire Dual Channel Addressable Switch
9 supported family codes:
15 Author: Mariusz Bialonczyk <manio@skyboo.net>
20 The DS2413 chip has two open-drain outputs (PIO A and PIO B).
21 Support is provided through the sysfs files "output" and "state".
25 The "state" file provides one-byte value which is in the same format as for
26 the chip PIO_ACCESS_READ command (refer the datasheet for details):
28 ======== =============================================================
30 Bit 1: PIOA Output Latch State
32 Bit 3: PIOB Output Latch State
33 Bit 4-7: Complement of Bit 3 to Bit 0 (verified by the kernel module)
34 ======== =============================================================
36 This file is readonly.
40 You can set the PIO pins using the "output" file.
41 It is writable, you can write one-byte value to this sysfs file.
42 Similarly the byte format is the same as for the PIO_ACCESS_WRITE command:
44 ======== ======================================
47 Bit 2-7: No matter (driver will set it to "1"s)
48 ======== ======================================
51 The chip has some kind of basic protection against transmission errors.
52 When reading the state, there is a four complement bits.
53 The driver is checking this complement, and when it is wrong then it is
56 When writing output, the master must repeat the PIO Output Data byte in
57 its inverted form and it is waiting for a confirmation.
58 If the write is unsuccessful for three times, the write also returns