diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-08-08 16:21:02 -0400 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-08-08 16:21:02 -0400 |
| commit | e4ddcb0a6bf04d53ce77b4eb87bbbb32c4261d11 (patch) | |
| tree | d27d2fea50a384d97aa2d0cf5c8657c916f761d4 /include/linux/spi/mcp23s08.h | |
| parent | f2afa7711f8585ffc088ba538b9a510e0d5dca12 (diff) | |
| parent | 6e86841d05f371b5b9b86ce76c02aaee83352298 (diff) | |
Merge commit 'v2.6.27-rc1' into for-linus
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, |
