Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1586673

[PATCH v2 1/4] w1: add missing DS2413 documentation

From Mariusz Bialonczyk <manio@skyboo.net>
Newsgroups linux.kernel
Subject [PATCH v2 1/4] w1: add missing DS2413 documentation
Date 2017-02-23 07:40 +0100
Message-ID <tdVei-5Qz-21@gated-at.bofh.it> (permalink)
References <tdVei-5Qz-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Signed-off-by: Mariusz Bialonczyk <manio@skyboo.net>
---
 Documentation/w1/slaves/00-INDEX  |  2 ++
 Documentation/w1/slaves/w1_ds2413 | 50 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+)
 create mode 100644 Documentation/w1/slaves/w1_ds2413

diff --git a/Documentation/w1/slaves/00-INDEX b/Documentation/w1/slaves/00-INDEX
index 6e18c70c3474..cbcca1d3a680 100644
--- a/Documentation/w1/slaves/00-INDEX
+++ b/Documentation/w1/slaves/00-INDEX
@@ -2,6 +2,8 @@
 	- This file
 w1_therm
 	- The Maxim/Dallas Semiconductor ds18*20 temperature sensor.
+w1_ds2413
+	- The Maxim/Dallas Semiconductor ds2413 dual channel addressable switch.
 w1_ds2423
 	- The Maxim/Dallas Semiconductor ds2423 counter device.
 w1_ds28e04
diff --git a/Documentation/w1/slaves/w1_ds2413 b/Documentation/w1/slaves/w1_ds2413
new file mode 100644
index 000000000000..936263a8ccb4
--- /dev/null
+++ b/Documentation/w1/slaves/w1_ds2413
@@ -0,0 +1,50 @@
+Kernel driver w1_ds2413
+=======================
+
+Supported chips:
+  * Maxim DS2413 1-Wire Dual Channel Addressable Switch
+
+supported family codes:
+        W1_FAMILY_DS2413        0x3A
+
+Author: Mariusz Bialonczyk <manio@skyboo.net>
+
+Description
+-----------
+
+The DS2413 chip has two open-drain outputs (PIO A and PIO B).
+Support is provided through the sysfs files "output" and "state".
+
+Reading state
+-------------
+The "state" file provides one-byte value which is in the same format as for
+the chip PIO_ACCESS_READ command (refer the datasheet for details):
+
+Bit 0:   PIOA Pin State
+Bit 1:   PIOA Output Latch State
+Bit 2:   PIOB Pin State
+Bit 3:   PIOB Output Latch State
+Bit 4-7: Complement of Bit 3 to Bit 0 (verified by the kernel module)
+
+This file is readonly.
+
+Writing output
+--------------
+You can set the PIO pins using the "output" file.
+It is writable, you can write one-byte value to this sysfs file.
+Similarly the byte format is the same as for the PIO_ACCESS_WRITE command:
+
+Bit 0:   PIOA
+Bit 1:   PIOB
+Bit 2-7: No matter (driver will set it to "1"s)
+
+
+The chip has some kind of basic protection against transmission errors.
+When reading the state, there is a four complement bits.
+The driver is checking this complement, and when it is wrong then it is
+returning I/O error.
+
+When writing output, the master must repeat the PIO Output Data byte in
+its inverted form and it is waiting for a confirmation.
+If the write is unsuccessful for three times, the write also returns
+I/O error.
-- 
2.11.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/4] w1: add DS2438 support, documentation and small fixes Mariusz Bialonczyk <manio@skyboo.net> - 2017-02-23 07:40 +0100
  [PATCH v2 4/4] w1: w1_ds2760.h: fix defines indentation Mariusz Bialonczyk <manio@skyboo.net> - 2017-02-23 07:40 +0100
  [PATCH v2 1/4] w1: add missing DS2413 documentation Mariusz Bialonczyk <manio@skyboo.net> - 2017-02-23 07:40 +0100
  [PATCH v2 2/4] w1: add support for DS2438 Smart Battery Monitor Mariusz Bialonczyk <manio@skyboo.net> - 2017-02-23 07:40 +0100
  Re: [PATCH v2 0/4] w1: add DS2438 support, documentation and small fixes Evgeniy Polyakov <zbr@ioremap.net> - 2017-02-23 20:00 +0100

csiph-web