aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/spi
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2008-02-05 01:28:25 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 12:44:13 -0500
commite58b9e2762a6ef99e20dba47aba21b911658541d (patch)
tree0097fbe262bb4d1944bfb3c9a922ec36b90851c5 /include/linux/spi
parent15fae37d9f5f21571a9618d8353164b6ddfea6f6 (diff)
mcp23s08 spi gpio expander support
Basic driver for 8-bit SPI based MCP23S08 GPIO expander, without support for IRQs or the shared chipselect mechanism. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Jean Delvare <khali@linux-fr.org> Cc: Eric Miao <eric.miao@marvell.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: Philipp Zabel <philipp.zabel@gmail.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Ben Gardner <bgardner@wabtec.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/spi')
-rw-r--r--include/linux/spi/mcp23s08.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/linux/spi/mcp23s08.h b/include/linux/spi/mcp23s08.h
new file mode 100644
index 000000000000..835ddf47d45c
--- /dev/null
+++ b/include/linux/spi/mcp23s08.h
@@ -0,0 +1,24 @@
1
2/* FIXME driver should be able to handle all four slaves that
3 * can be hooked up to each chipselect, as well as IRQs...
4 */
5
6struct mcp23s08_platform_data {
7 /* four slaves can share one SPI chipselect */
8 u8 slave;
9
10 /* number assigned to the first GPIO */
11 unsigned base;
12
13 /* pins with pullups */
14 u8 pullups;
15
16 void *context; /* param to setup/teardown */
17
18 int (*setup)(struct spi_device *spi,
19 int gpio, unsigned ngpio,
20 void *context);
21 int (*teardown)(struct spi_device *spi,
22 int gpio, unsigned ngpio,
23 void *context);
24};