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>
This commit is contained in:
committed by
Linus Torvalds
parent
15fae37d9f
commit
e58b9e2762
24
include/linux/spi/mcp23s08.h
Normal file
24
include/linux/spi/mcp23s08.h
Normal file
@ -0,0 +1,24 @@
|
||||
|
||||
/* FIXME driver should be able to handle all four slaves that
|
||||
* can be hooked up to each chipselect, as well as IRQs...
|
||||
*/
|
||||
|
||||
struct mcp23s08_platform_data {
|
||||
/* four slaves can share one SPI chipselect */
|
||||
u8 slave;
|
||||
|
||||
/* number assigned to the first GPIO */
|
||||
unsigned base;
|
||||
|
||||
/* pins with pullups */
|
||||
u8 pullups;
|
||||
|
||||
void *context; /* param to setup/teardown */
|
||||
|
||||
int (*setup)(struct spi_device *spi,
|
||||
int gpio, unsigned ngpio,
|
||||
void *context);
|
||||
int (*teardown)(struct spi_device *spi,
|
||||
int gpio, unsigned ngpio,
|
||||
void *context);
|
||||
};
|
Reference in New Issue
Block a user