i2c-mux-gpio.h 955 B

123456789101112131415161718192021222324252627282930313233
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * i2c-mux-gpio interface to platform code
  4. *
  5. * Peter Korsgaard <[email protected]>
  6. */
  7. #ifndef _LINUX_I2C_MUX_GPIO_H
  8. #define _LINUX_I2C_MUX_GPIO_H
  9. /* MUX has no specific idle mode */
  10. #define I2C_MUX_GPIO_NO_IDLE ((unsigned)-1)
  11. /**
  12. * struct i2c_mux_gpio_platform_data - Platform-dependent data for i2c-mux-gpio
  13. * @parent: Parent I2C bus adapter number
  14. * @base_nr: Base I2C bus number to number adapters from or zero for dynamic
  15. * @values: Array of bitmasks of GPIO settings (low/high) for each
  16. * position
  17. * @n_values: Number of multiplexer positions (busses to instantiate)
  18. * @classes: Optional I2C auto-detection classes
  19. * @idle: Bitmask to write to MUX when idle or GPIO_I2CMUX_NO_IDLE if not used
  20. */
  21. struct i2c_mux_gpio_platform_data {
  22. int parent;
  23. int base_nr;
  24. const unsigned *values;
  25. int n_values;
  26. const unsigned *classes;
  27. unsigned idle;
  28. };
  29. #endif /* _LINUX_I2C_MUX_GPIO_H */