blob: 738a45b435f213da0e7ed4b9f257c9c7fe1812bd [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
David Brownelle58b9e22008-02-04 22:28:25 -08002struct mcp23s08_platform_data {
Peter Korsgaard0b7bb772011-03-09 17:56:30 +01003 /* 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.
David Brownell8f1cc3b2008-07-25 01:46:09 -07008 */
Sebastian Reichelce9bd0a2017-05-15 11:24:36 +02009 u32 spi_present_mask;
David Brownelle58b9e22008-02-04 22:28:25 -080010
Sebastian Reichel7f38c5b2017-05-15 11:24:38 +020011 /* "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).
David Brownell8f1cc3b2008-07-25 01:46:09 -070016 */
David Brownelle58b9e22008-02-04 22:28:25 -080017 unsigned base;
David Brownelle58b9e22008-02-04 22:28:25 -080018};