diff options
Diffstat (limited to 'include/linux/spi/mcp23s08.h')
-rw-r--r-- | include/linux/spi/mcp23s08.h | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/include/linux/spi/mcp23s08.h b/include/linux/spi/mcp23s08.h index 835ddf47d45c..22ef107d7704 100644 --- a/include/linux/spi/mcp23s08.h +++ b/include/linux/spi/mcp23s08.h | |||
@@ -1,18 +1,25 @@ | |||
1 | 1 | ||
2 | /* FIXME driver should be able to handle all four slaves that | 2 | /* FIXME driver should be able to handle IRQs... */ |
3 | * can be hooked up to each chipselect, as well as IRQs... | 3 | |
4 | */ | 4 | struct mcp23s08_chip_info { |
5 | bool is_present; /* true iff populated */ | ||
6 | u8 pullups; /* BIT(x) means enable pullup x */ | ||
7 | }; | ||
5 | 8 | ||
6 | struct mcp23s08_platform_data { | 9 | struct mcp23s08_platform_data { |
7 | /* four slaves can share one SPI chipselect */ | 10 | /* Four slaves (numbered 0..3) can share one SPI chipselect, and |
8 | u8 slave; | 11 | * will provide 8..32 GPIOs using 1..4 gpio_chip instances. |
12 | */ | ||
13 | struct mcp23s08_chip_info chip[4]; | ||
9 | 14 | ||
10 | /* number assigned to the first GPIO */ | 15 | /* "base" is the number of the first GPIO. Dynamic assignment is |
16 | * not currently supported, and even if there are gaps in chip | ||
17 | * addressing the GPIO numbers are sequential .. so for example | ||
18 | * if only slaves 0 and 3 are present, their GPIOs range from | ||
19 | * base to base+15. | ||
20 | */ | ||
11 | unsigned base; | 21 | unsigned base; |
12 | 22 | ||
13 | /* pins with pullups */ | ||
14 | u8 pullups; | ||
15 | |||
16 | void *context; /* param to setup/teardown */ | 23 | void *context; /* param to setup/teardown */ |
17 | 24 | ||
18 | int (*setup)(struct spi_device *spi, | 25 | int (*setup)(struct spi_device *spi, |