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 | |
8 | #ifndef _LINUX_I2C_MLXCPLD_H |
9 | #define _LINUX_I2C_MLXCPLD_H |
10 | |
11 | /* Platform data for the CPLD I2C multiplexers */ |
12 | |
13 | /* mlxcpld_mux_plat_data - per mux data, used with i2c_register_board_info |
14 | * @chan_ids - channels array |
15 | * @num_adaps - number of adapters |
16 | * @sel_reg_addr - mux select register offset in CPLD space |
17 | * @reg_size: register size in bytes |
18 | * @handle: handle to be passed by callback |
19 | * @completion_notify: callback to notify when all the adapters are created |
20 | */ |
21 | struct mlxcpld_mux_plat_data { |
22 | int *chan_ids; |
23 | int num_adaps; |
24 | int sel_reg_addr; |
25 | u8 reg_size; |
26 | void *handle; |
27 | int (*completion_notify)(void *handle, struct i2c_adapter *parent, |
28 | struct i2c_adapter *adapters[]); |
29 | }; |
30 | |
31 | #endif /* _LINUX_I2C_MLXCPLD_H */ |
32 | |