Skip to content

Commit a9ee205

Browse files
maniogregkh
authored andcommitted
w1: add missing DS2413 documentation
Signed-off-by: Mariusz Bialonczyk <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent c2a49fe commit a9ee205

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

Documentation/w1/slaves/00-INDEX

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
- This file
33
w1_therm
44
- The Maxim/Dallas Semiconductor ds18*20 temperature sensor.
5+
w1_ds2413
6+
- The Maxim/Dallas Semiconductor ds2413 dual channel addressable switch.
57
w1_ds2423
68
- The Maxim/Dallas Semiconductor ds2423 counter device.
79
w1_ds28e04

Documentation/w1/slaves/w1_ds2413

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
Kernel driver w1_ds2413
2+
=======================
3+
4+
Supported chips:
5+
* Maxim DS2413 1-Wire Dual Channel Addressable Switch
6+
7+
supported family codes:
8+
W1_FAMILY_DS2413 0x3A
9+
10+
Author: Mariusz Bialonczyk <[email protected]>
11+
12+
Description
13+
-----------
14+
15+
The DS2413 chip has two open-drain outputs (PIO A and PIO B).
16+
Support is provided through the sysfs files "output" and "state".
17+
18+
Reading state
19+
-------------
20+
The "state" file provides one-byte value which is in the same format as for
21+
the chip PIO_ACCESS_READ command (refer the datasheet for details):
22+
23+
Bit 0: PIOA Pin State
24+
Bit 1: PIOA Output Latch State
25+
Bit 2: PIOB Pin State
26+
Bit 3: PIOB Output Latch State
27+
Bit 4-7: Complement of Bit 3 to Bit 0 (verified by the kernel module)
28+
29+
This file is readonly.
30+
31+
Writing output
32+
--------------
33+
You can set the PIO pins using the "output" file.
34+
It is writable, you can write one-byte value to this sysfs file.
35+
Similarly the byte format is the same as for the PIO_ACCESS_WRITE command:
36+
37+
Bit 0: PIOA
38+
Bit 1: PIOB
39+
Bit 2-7: No matter (driver will set it to "1"s)
40+
41+
42+
The chip has some kind of basic protection against transmission errors.
43+
When reading the state, there is a four complement bits.
44+
The driver is checking this complement, and when it is wrong then it is
45+
returning I/O error.
46+
47+
When writing output, the master must repeat the PIO Output Data byte in
48+
its inverted form and it is waiting for a confirmation.
49+
If the write is unsuccessful for three times, the write also returns
50+
I/O error.

0 commit comments

Comments
 (0)