pinctrl: mcp23s08: simplify spi_present_mask handling

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Sebastian Reichel
2017-05-15 11:24:36 +02:00
committed by Linus Walleij
parent 5b1a7e803a
commit ce9bd0a0ff
3 changed files with 13 additions and 26 deletions

View File

@@ -1,10 +1,6 @@
/* FIXME driver should be able to handle IRQs... */
struct mcp23s08_chip_info {
bool is_present; /* true if populated */
};
struct mcp23s08_platform_data {
/* For mcp23s08, up to 4 slaves (numbered 0..3) can share one SPI
* chipselect, each providing 1 gpio_chip instance with 8 gpios.
@@ -12,7 +8,7 @@ struct mcp23s08_platform_data {
* chipselect, each providing 1 gpio_chip (port A + port B) with
* 16 gpios.
*/
struct mcp23s08_chip_info chip[8];
u32 spi_present_mask;
/* "base" is the number of the first GPIO. Dynamic assignment is
* not currently supported, and even if there are gaps in chip