blob: 738a45b435f213da0e7ed4b9f257c9c7fe1812bd [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001/* SPDX-License-Identifier: GPL-2.0 */
2struct mcp23s08_platform_data {
3 /* For mcp23s08, up to 4 slaves (numbered 0..3) can share one SPI
4 * chipselect, each providing 1 gpio_chip instance with 8 gpios.
5 * For mpc23s17, up to 8 slaves (numbered 0..7) can share one SPI
6 * chipselect, each providing 1 gpio_chip (port A + port B) with
7 * 16 gpios.
8 */
9 u32 spi_present_mask;
10
11 /* "base" is the number of the first GPIO or -1 for dynamic
12 * assignment. If there are gaps in chip addressing the GPIO
13 * numbers are sequential .. so for example if only slaves 0
14 * and 3 are present, their GPIOs range from base to base+15
15 * (or base+31 for s17 variant).
16 */
17 unsigned base;
18};