Skip to content

Commit fbf7f7b

Browse files
Markus Frankegregkh
authored andcommitted
w1: Add 1-wire slave device driver for DS28E04-100
Signed-off-by: Markus Franke <franm@hrz.tu-chemnitz.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent a59d629 commit fbf7f7b

6 files changed

Lines changed: 535 additions & 0 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
What: /sys/bus/w1/devices/.../pio
2+
Date: May 2012
3+
Contact: Markus Franke <franm@hrz.tu-chemnitz.de>
4+
Description: read/write the contents of the two PIO's of the DS28E04-100
5+
see Documentation/w1/slaves/w1_ds28e04 for detailed information
6+
Users: any user space application which wants to communicate with DS28E04-100
7+
8+
9+
10+
What: /sys/bus/w1/devices/.../eeprom
11+
Date: May 2012
12+
Contact: Markus Franke <franm@hrz.tu-chemnitz.de>
13+
Description: read/write the contents of the EEPROM memory of the DS28E04-100
14+
see Documentation/w1/slaves/w1_ds28e04 for detailed information
15+
Users: any user space application which wants to communicate with DS28E04-100

‎Documentation/w1/slaves/w1_ds28e04‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Kernel driver w1_ds28e04
2+
========================
3+
4+
Supported chips:
5+
* Maxim DS28E04-100 4096-Bit Addressable 1-Wire EEPROM with PIO
6+
7+
supported family codes:
8+
W1_FAMILY_DS28E04 0x1C
9+
10+
Author: Markus Franke, <franke.m@sebakmt.com> <franm@hrz.tu-chemnitz.de>
11+
12+
Description
13+
-----------
14+
15+
Support is provided through the sysfs files "eeprom" and "pio". CRC checking
16+
during memory accesses can optionally be enabled/disabled via the device
17+
attribute "crccheck". The strong pull-up can optionally be enabled/disabled
18+
via the module parameter "w1_strong_pullup".
19+
20+
Memory Access
21+
22+
A read operation on the "eeprom" file reads the given amount of bytes
23+
from the EEPROM of the DS28E04.
24+
25+
A write operation on the "eeprom" file writes the given byte sequence
26+
to the EEPROM of the DS28E04. If CRC checking mode is enabled only
27+
fully alligned blocks of 32 bytes with valid CRC16 values (in bytes 30
28+
and 31) are allowed to be written.
29+
30+
PIO Access
31+
32+
The 2 PIOs of the DS28E04-100 are accessible via the "pio" sysfs file.
33+
34+
The current status of the PIO's is returned as an 8 bit value. Bit 0/1
35+
represent the state of PIO_0/PIO_1. Bits 2..7 do not care. The PIO's are
36+
driven low-active, i.e. the driver delivers/expects low-active values.

‎drivers/w1/slaves/Kconfig‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,19 @@ config W1_SLAVE_DS2781
9494

9595
If you are unsure, say N.
9696

97+
config W1_SLAVE_DS28E04
98+
tristate "4096-Bit Addressable 1-Wire EEPROM with PIO (DS28E04-100)"
99+
depends on W1
100+
select CRC16
101+
help
102+
If you enable this you will have the DS28E04-100
103+
chip support.
104+
105+
Say Y here if you want to use a 1-wire
106+
4kb EEPROM with PIO family device (DS28E04).
107+
108+
If you are unsure, say N.
109+
97110
config W1_SLAVE_BQ27000
98111
tristate "BQ27000 slave support"
99112
depends on W1

‎drivers/w1/slaves/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ obj-$(CONFIG_W1_SLAVE_DS2760) += w1_ds2760.o
1212
obj-$(CONFIG_W1_SLAVE_DS2780) += w1_ds2780.o
1313
obj-$(CONFIG_W1_SLAVE_DS2781) += w1_ds2781.o
1414
obj-$(CONFIG_W1_SLAVE_BQ27000) += w1_bq27000.o
15+
obj-$(CONFIG_W1_SLAVE_DS28E04) += w1_ds28e04.o

0 commit comments

Comments
 (0)