summaryrefslogtreecommitdiffstats
path: root/include/linux/eeprom_93xx46.h
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2011-07-25 17:13:27 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-25 20:57:16 -0700
commit06b4501e88ad10f02849a3f9d7408ed6ae15a53f (patch)
tree641a1c6044582b393ad4d877f6a9924cc495bfc0 /include/linux/eeprom_93xx46.h
parent6e60c02e9d9427f59842192bdb123cbeaf8bc9a0 (diff)
misc/eeprom: add driver for microwire 93xx46 EEPROMs
Add EEPROM driver for 93xx46 chips. It can also be used with spi_gpio driver to access 93xx46 EEPROMs connected over GPIO lines. This driver supports read/write/erase access to the EEPROM chips over sysfs files. [rdunlap@xenotime.net: fix printk format] Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Jonathan Cameron <jic23@cam.ac.uk> Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/eeprom_93xx46.h')
-rw-r--r--include/linux/eeprom_93xx46.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/eeprom_93xx46.h b/include/linux/eeprom_93xx46.h
new file mode 100644
index 00000000000..06791811e49
--- /dev/null
+++ b/include/linux/eeprom_93xx46.h
@@ -0,0 +1,18 @@
+/*
+ * Module: eeprom_93xx46
+ * platform description for 93xx46 EEPROMs.
+ */
+
+struct eeprom_93xx46_platform_data {
+ unsigned char flags;
+#define EE_ADDR8 0x01 /* 8 bit addr. cfg */
+#define EE_ADDR16 0x02 /* 16 bit addr. cfg */
+#define EE_READONLY 0x08 /* forbid writing */
+
+ /*
+ * optional hooks to control additional logic
+ * before and after spi transfer.
+ */
+ void (*prepare)(void *);
+ void (*finish)(void *);
+};