i2c-mux-reg.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * I2C multiplexer using a single register
  3. *
  4. * Copyright 2015 Freescale Semiconductor
  5. * York Sun <yorksun@freescale.com>
  6. *
  7. * This program is free software; you can redistribute it and/or modify it
  8. * under the terms of the GNU General Public License as published by the
  9. * Free Software Foundation; either version 2 of the License, or (at your
  10. * option) any later version.
  11. */
  12. #ifndef __LINUX_PLATFORM_DATA_I2C_MUX_REG_H
  13. #define __LINUX_PLATFORM_DATA_I2C_MUX_REG_H
  14. /**
  15. * struct i2c_mux_reg_platform_data - Platform-dependent data for i2c-mux-reg
  16. * @parent: Parent I2C bus adapter number
  17. * @base_nr: Base I2C bus number to number adapters from or zero for dynamic
  18. * @values: Array of value for each channel
  19. * @n_values: Number of multiplexer channels
  20. * @little_endian: Indicating if the register is in little endian
  21. * @write_only: Reading the register is not allowed by hardware
  22. * @classes: Optional I2C auto-detection classes
  23. * @idle: Value to write to mux when idle
  24. * @idle_in_use: indicate if idle value is in use
  25. * @reg: Virtual address of the register to switch channel
  26. * @reg_size: register size in bytes
  27. */
  28. struct i2c_mux_reg_platform_data {
  29. int parent;
  30. int base_nr;
  31. const unsigned int *values;
  32. int n_values;
  33. bool little_endian;
  34. bool write_only;
  35. const unsigned int *classes;
  36. u32 idle;
  37. bool idle_in_use;
  38. void __iomem *reg;
  39. resource_size_t reg_size;
  40. };
  41. #endif /* __LINUX_PLATFORM_DATA_I2C_MUX_REG_H */