mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-22 20:23:57 +08:00
e58b9e2762
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>
25 lines
554 B
C
25 lines
554 B
C
|
|
/* 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);
|
|
};
|