mlxcpld.h 885 B

12345678910111213141516171819202122232425262728293031
  1. /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
  2. /*
  3. * Mellanox I2C multiplexer support in CPLD
  4. *
  5. * Copyright (C) 2016-2020 Mellanox Technologies
  6. */
  7. #ifndef _LINUX_I2C_MLXCPLD_H
  8. #define _LINUX_I2C_MLXCPLD_H
  9. /* Platform data for the CPLD I2C multiplexers */
  10. /* mlxcpld_mux_plat_data - per mux data, used with i2c_register_board_info
  11. * @chan_ids - channels array
  12. * @num_adaps - number of adapters
  13. * @sel_reg_addr - mux select register offset in CPLD space
  14. * @reg_size: register size in bytes
  15. * @handle: handle to be passed by callback
  16. * @completion_notify: callback to notify when all the adapters are created
  17. */
  18. struct mlxcpld_mux_plat_data {
  19. int *chan_ids;
  20. int num_adaps;
  21. int sel_reg_addr;
  22. u8 reg_size;
  23. void *handle;
  24. int (*completion_notify)(void *handle, struct i2c_adapter *parent,
  25. struct i2c_adapter *adapters[]);
  26. };
  27. #endif /* _LINUX_I2C_MLXCPLD_H */