2 * i2c-mux-gpio interface to platform code
4 * Peter Korsgaard <peter.korsgaard@barco.com>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
11 #ifndef _LINUX_I2C_MUX_GPIO_H
12 #define _LINUX_I2C_MUX_GPIO_H
14 /* MUX has no specific idle mode */
15 #define I2C_MUX_GPIO_NO_IDLE ((unsigned)-1)
18 * struct i2c_mux_gpio_platform_data - Platform-dependent data for i2c-mux-gpio
19 * @parent: Parent I2C bus adapter number
20 * @base_nr: Base I2C bus number to number adapters from or zero for dynamic
21 * @values: Array of bitmasks of GPIO settings (low/high) for each
23 * @n_values: Number of multiplexer positions (busses to instantiate)
24 * @classes: Optional I2C auto-detection classes
25 * @gpio_chip: Optional GPIO chip name; if set, GPIO pin numbers are given
26 * relative to the base GPIO number of that chip
27 * @gpios: Array of GPIO numbers used to control MUX
28 * @n_gpios: Number of GPIOs used to control MUX
29 * @idle: Bitmask to write to MUX when idle or GPIO_I2CMUX_NO_IDLE if not used
31 struct i2c_mux_gpio_platform_data
{
34 const unsigned *values
;
36 const unsigned *classes
;
38 const unsigned *gpios
;
43 #endif /* _LINUX_I2C_MUX_GPIO_H */