linux_dsm_epyc7002/drivers/w1/slaves
Angelo Dureghello c6bf3842a3 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

Signed-off-by: Angelo Dureghello <angelo.dureghello@timesys.com>
Link: https://lore.kernel.org/r/20191019204015.61474-1-angelo.dureghello@timesys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-14 13:06:33 +08:00
..
Kconfig w1: new driver. DS2430 chip 2019-11-14 13:06:33 +08:00
Makefile w1: new driver. DS2430 chip 2019-11-14 13:06:33 +08:00
w1_ds28e04.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230 2019-06-19 17:09:06 +02:00
w1_ds28e17.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230 2019-06-19 17:09:06 +02:00
w1_ds250x.c w1: add DS2501, DS2502, DS2505 EPROM device driver 2019-09-04 14:34:31 +02:00
w1_ds2405.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 144 2019-05-30 11:25:17 -07:00
w1_ds2406.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230 2019-06-19 17:09:06 +02:00
w1_ds2408.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230 2019-06-19 17:09:06 +02:00
w1_ds2413.c Merge 5.2-rc6 into char-misc-next 2019-06-23 09:23:33 +02:00
w1_ds2423.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 147 2019-05-30 11:25:18 -07:00
w1_ds2430.c w1: new driver. DS2430 chip 2019-11-14 13:06:33 +08:00
w1_ds2431.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230 2019-06-19 17:09:06 +02:00
w1_ds2433.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230 2019-06-19 17:09:06 +02:00
w1_ds2438.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230 2019-06-19 17:09:06 +02:00
w1_ds2780.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
w1_ds2780.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
w1_ds2781.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
w1_ds2781.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
w1_ds2805.c Merge 5.2-rc6 into char-misc-next 2019-06-23 09:23:33 +02:00
w1_smem.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 94 2019-05-24 17:37:53 +02:00
w1_therm.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 147 2019-05-30 11:25:18 -07:00