w1: new driver. DS2430 chip
PATCH v2 1/1 w1: new driver. DS2430 chip
add support for ds2430, 1 page, 256bit (32bytes) eeprom (family 0x14).
Tests done:
32 bytes dump:
x@y:~# hexdump -C -n 32 /sys/bus/w1/devices/14-00000158556e/eeprom 00000000 39 39 0a 00 00 36 0a ff ff ff ff ff ff ff ff ff 00000010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00000020
34 bytes dump: 32 only displayed
x@y:~# hexdump -C -n 34 /sys/bus/w1/devices/14-00000158556e/eeprom 00000000 39 39 0a 00 00 36 0a ff ff ff ff ff ff ff ff ff 00000010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00000020
pattern write:
x@y:~# echo 123456789 > /sys/bus/w1/devices/14-00000158556e/eeprom x@y:~# hexdump -C -n 54 /sys/bus/w1/devices/14-00000158556e/eeprom 00000000 31 32 33 34 35 36 37 38 39 0a ff ff ff ff ff ff 00000010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00000020
specific address 1-byte write
x@y:~# dd if=/dev/zero of=/sys/bus/w1/devices/14-00000158556e/eeprom \ count=1 bs=1 seek=4 1+0 records in 1+0 records out x@y:~# hexdump -C -n 54 /sys/bus/w1/devices/14-00000158556e/eeprom 00000000 31 32 33 34 00 36 37 38 39 0a ff ff ff ff ff ff 00000010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00000020
writing binary block
x@y:~# cat dump-128bytes.bin > /sys/bus/w1/devices/14-00000158556e/eeprom cat: write error: File too large
x@y:~# cat dump-32bytes.bin > /sys/bus/w1/devices/14-00000158556e/eeprom x@y:~# hexdump -C -n 54 /sys/bus/w1/devices/14-00000158556e/eeprom 00000000 10 0b 5b ff ff ff ff ff ff ff ff ff ff ff ff ff 00000010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 40 00000020
--- drivers/w1/slaves/Kconfig | 8 + drivers/w1/slaves/Makefile | 1 + drivers/w1/slaves/w1_ds2430.c | 295 ++++++++++++++++++++++++++++++++++ 3 files changed, 304 insertions(+) create mode 100644 drivers/w1/slaves/w1_ds2430.c
drivers/w1/slaves/Kconfig +8 -0
@@ -74,6 +74,14 @@ config W1_SLAVE_DS2805 organized as 7 pages of 16 bytes each with 64bit unique number. Requires OverDrive Speed to talk to. +config W1_SLAVE_DS2430 + tristate "256b EEPROM family support (DS2430)" + help + Say Y here if you want to use a 1-wire 256bit EEPROM + family device (DS2430). + This EEPROM is organized as one page of 32 bytes for random + access. + config W1_SLAVE_DS2431 tristate "1kb EEPROM family support (DS2431)" help
drivers/w1/slaves/Makefile +1 -0
@@ -10,6 +10,7 @@ obj-$(CONFIG_W1_SLAVE_DS2408) += w1_ds2408.o obj-$(CONFIG_W1_SLAVE_DS2413) += w1_ds2413.o obj-$(CONFIG_W1_SLAVE_DS2406) += w1_ds2406.o obj-$(CONFIG_W1_SLAVE_DS2423) += w1_ds2423.o +obj-$(CONFIG_W1_SLAVE_DS2430) += w1_ds2430.o obj-$(CONFIG_W1_SLAVE_DS2431) += w1_ds2431.o obj-$(CONFIG_W1_SLAVE_DS2805) += w1_ds2805.o obj-$(CONFIG_W1_SLAVE_DS2433) += w1_ds2433.o
drivers/w1/slaves/w1_ds2430.c new file +295 -0
295 lines not on this page · raw message
Signature · 1 line
2.23.0
Hi Angelo, Greg
19.10.2019, 23:38, "Angelo Dureghello" <[email protected]>:
Quoted 4 lines
add support for ds2430, 1 page, 256bit (32bytes) eeprom (family
0x14).Signed-off-by Angelo Dureghello <[email protected]>
Looks good to me.
Greg, please pull it into your tree.
Quoted 6 lines · Evgeniy Polyakov
Hi Angelo, Greg
19.10.2019, 23:38, "Angelo Dureghello" <[email protected]>:
Quoted 3 lines
add support for ds2430, 1 page, 256bit (32bytes) eeprom (family
0x14).
Quoted 6 lines
Quoted 1 line
Signed-off-by Angelo Dureghello <[email protected]>Looks good to me.
Greg, please pull it into your tree.Acked-by Evgeniy Polyakov <[email protected]>
I don't have a copy of this anywhere :(
Angelo, can you resend it and cc: me and add evgeniy's ack?
thanks,
greg k-h
Angelo Dureghello
Acked-by Evgeniy PolyakovHi Greg (and Evgeniy),
Quoted 10 lines · On Wed, Nov 20, 2019 at 9:59 PM [email protected]…
Quoted 8 lines · Evgeniy Polyakov
Hi Angelo, Greg
19.10.2019, 23:38, "Angelo Dureghello" <[email protected]>:
Quoted 4 lines
add support for ds2430, 1 page, 256bit (32bytes) eeprom (family
0x14).Signed-off-by Angelo Dureghello <[email protected]>
Quoted 9 lines
Quoted 4 lines
Looks good to me.
Greg, please pull it into your tree.Acked-by Evgeniy Polyakov <[email protected]>I don't have a copy of this anywhere :(
Angelo, can you resend it and cc: me and add evgeniy's ack?
this is he patch you applied to your char-misc-next branch, some days ago.
I added Evgeniy acked-by.
So you should revert/remove
commit c6bf3842a34abe3ec2f5bc81754883689aea6c0d (patch)
from char-misc-next and apply new patch attached. Or maybe you can just amend it and add the acked-by.
Quoted 3 lines
thanks,
greg k-h
thanks,
Regards,
--
Angelo Dureghello
From 4b1de6999c2899b67e1fe3d8f87cd85abc2b1d5e Mon Sep 17 00:00:00 2001
From: Angelo Dureghello <[email protected]>
Date: Fri, 15 Nov 2019 11:03:49 +0100
Subject: [PATCH] w1: new driver. DS2430 chip
add support for ds2430, 1 page, 256bit (32bytes) eeprom (family 0x14).
Tests done:
32 bytes dump:
x@y:~# hexdump -C -n 32 /sys/bus/w1/devices/14-00000158556e/eeprom 00000000 39 39 0a 00 00 36 0a ff ff ff ff ff ff ff ff ff 00000010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00000020
34 bytes dump: 32 only displayed
x@y:~# hexdump -C -n 34 /sys/bus/w1/devices/14-00000158556e/eeprom 00000000 39 39 0a 00 00 36 0a ff ff ff ff ff ff ff ff ff 00000010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00000020
pattern write:
x@y:~# echo 123456789 > /sys/bus/w1/devices/14-00000158556e/eeprom x@y:~# hexdump -C -n 54 /sys/bus/w1/devices/14-00000158556e/eeprom 00000000 31 32 33 34 35 36 37 38 39 0a ff ff ff ff ff ff 00000010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00000020
specific address 1-byte write
x@y:~# dd if=/dev/zero of=/sys/bus/w1/devices/14-00000158556e/eeprom \
count=1 bs=1 seek=4
1+0 records in
1+0 records out
x@y:~# hexdump -C -n 54 /sys/bus/w1/devices/14-00000158556e/eeprom
00000000 31 32 33 34 00 36 37 38 39 0a ff ff ff ff ff ff
00000010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
00000020writing binary block
x@y:~# cat dump-128bytes.bin > /sys/bus/w1/devices/14-00000158556e/eeprom cat: write error: File too large
x@y:~# cat dump-32bytes.bin > /sys/bus/w1/devices/14-00000158556e/eeprom x@y:~# hexdump -C -n 54 /sys/bus/w1/devices/14-00000158556e/eeprom 00000000 10 0b 5b ff ff ff ff ff ff ff ff ff ff ff ff ff 00000010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 40 00000020
--- drivers/w1/slaves/Kconfig | 8 + drivers/w1/slaves/Makefile | 1 + drivers/w1/slaves/w1_ds2430.c | 295 ++++++++++++++++++++++++++++++++++ 3 files changed, 304 insertions(+) create mode 100644 drivers/w1/slaves/w1_ds2430.c
drivers/w1/slaves/Kconfig +8 -0
@@ -74,6 +74,14 @@ config W1_SLAVE_DS2805 organized as 7 pages of 16 bytes each with 64bit unique number. Requires OverDrive Speed to talk to. +config W1_SLAVE_DS2430 + tristate "256b EEPROM family support (DS2430)" + help + Say Y here if you want to use a 1-wire 256bit EEPROM + family device (DS2430). + This EEPROM is organized as one page of 32 bytes for random + access. + config W1_SLAVE_DS2431 tristate "1kb EEPROM family support (DS2431)" help
drivers/w1/slaves/Makefile +1 -0
@@ -10,6 +10,7 @@ obj-$(CONFIG_W1_SLAVE_DS2408) += w1_ds2408.o obj-$(CONFIG_W1_SLAVE_DS2413) += w1_ds2413.o obj-$(CONFIG_W1_SLAVE_DS2406) += w1_ds2406.o obj-$(CONFIG_W1_SLAVE_DS2423) += w1_ds2423.o +obj-$(CONFIG_W1_SLAVE_DS2430) += w1_ds2430.o obj-$(CONFIG_W1_SLAVE_DS2431) += w1_ds2431.o obj-$(CONFIG_W1_SLAVE_DS2805) += w1_ds2805.o obj-$(CONFIG_W1_SLAVE_DS2433) += w1_ds2433.o
drivers/w1/slaves/w1_ds2430.c new file +295 -0
295 lines not on this page · raw message
Signature · 1 line
2.24.0
Quoted 24 lines · Angelo Dureghello
Hi Greg (and Evgeniy),
Quoted 10 lines · On Wed, Nov 20, 2019 at 9:59 PM [email protected]…
Quoted 8 lines · Evgeniy Polyakov
Hi Angelo, Greg
19.10.2019, 23:38, "Angelo Dureghello" <[email protected]>:
Quoted 4 lines
add support for ds2430, 1 page, 256bit (32bytes) eeprom (family
0x14).Signed-off-by Angelo Dureghello <[email protected]>Quoted 9 lines
Quoted 4 lines
Looks good to me.
Greg, please pull it into your tree.Acked-by Evgeniy Polyakov <[email protected]>I don't have a copy of this anywhere :(
Angelo, can you resend it and cc: me and add evgeniy's ack?
Quoted 6 lines
this is he patch you applied to your char-misc-next branch, some days ago.
I added Evgeniy acked-by.
So you should revert/remove
commitc6bf3842a34abe3ec2f5bc81754883689aea6c0d(patch)
Ah, no, I'm not going to revert it just for an ack, I'll just leave it as-is, thanks.
greg k-h