Skip to content

Commit b587b13

Browse files
David BrownellLinus Torvalds
David Brownell
authored and
Linus Torvalds
committed
[PATCH] SPI eeprom driver
This is adds a simple SPI EEPROM driver, providing access to the EEPROM through sysfs much like the I2C "eeprom" driver ... except this driver supports write access, and multiple EEPROM sizes. From: "Tuppa, Walter" <[email protected]> Since I have EEPROMs on SPI with different address sizing, I made some changes to your at25.c to support them. Works perfectly. (Also includes a small bugfix for the "what size address" test.) Signed-off-by: David Brownell <[email protected]> Signed-off-by: Walter Tuppa <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 3925a5c commit b587b13

File tree

4 files changed

+414
-0
lines changed

4 files changed

+414
-0
lines changed

drivers/spi/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,16 @@ config SPI_S3C24XX_GPIO
135135
comment "SPI Protocol Masters"
136136
depends on SPI_MASTER
137137

138+
config SPI_AT25
139+
tristate "SPI EEPROMs from most vendors"
140+
depends on SPI_MASTER && SYSFS
141+
help
142+
Enable this driver to get read/write support to most SPI EEPROMs,
143+
after you configure the board init code to know about each eeprom
144+
on your target board.
145+
146+
This driver can also be built as a module. If so, the module
147+
will be called at25.
138148

139149
#
140150
# Add new SPI protocol masters in alphabetical order above this line

drivers/spi/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ obj-$(CONFIG_SPI_S3C24XX) += spi_s3c24xx.o
2222
# ... add above this line ...
2323

2424
# SPI protocol drivers (device/link on bus)
25+
obj-$(CONFIG_SPI_AT25) += at25.o
2526
# ... add above this line ...
2627

2728
# SPI slave controller drivers (upstream link)

0 commit comments

Comments
 (0)