Skip to content

Commit

Permalink
[PATCH] SPI eeprom driver
Browse files Browse the repository at this point in the history
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" <walter.tuppa@siemens.com>

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 <dbrownell@users.sourceforge.net>
Signed-off-by: Walter Tuppa <walter.tuppa@siemens.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
David Brownell authored and Linus Torvalds committed Feb 12, 2007
1 parent 3925a5c commit b587b13
Show file tree
Hide file tree
Showing 4 changed files with 414 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/spi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,16 @@ config SPI_S3C24XX_GPIO
comment "SPI Protocol Masters"
depends on SPI_MASTER

config SPI_AT25
tristate "SPI EEPROMs from most vendors"
depends on SPI_MASTER && SYSFS
help
Enable this driver to get read/write support to most SPI EEPROMs,
after you configure the board init code to know about each eeprom
on your target board.

This driver can also be built as a module. If so, the module
will be called at25.

#
# Add new SPI protocol masters in alphabetical order above this line
Expand Down
1 change: 1 addition & 0 deletions drivers/spi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ obj-$(CONFIG_SPI_S3C24XX) += spi_s3c24xx.o
# ... add above this line ...

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

# SPI slave controller drivers (upstream link)
Expand Down
Loading

0 comments on commit b587b13

Please sign in to comment.