Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
0002 /*
0003  * Mellanox I2C multiplexer support in CPLD
0004  *
0005  * Copyright (C) 2016-2020 Mellanox Technologies
0006  */
0007 
0008 #ifndef _LINUX_I2C_MLXCPLD_H
0009 #define _LINUX_I2C_MLXCPLD_H
0010 
0011 /* Platform data for the CPLD I2C multiplexers */
0012 
0013 /* mlxcpld_mux_plat_data - per mux data, used with i2c_register_board_info
0014  * @chan_ids - channels array
0015  * @num_adaps - number of adapters
0016  * @sel_reg_addr - mux select register offset in CPLD space
0017  * @reg_size: register size in bytes
0018  * @handle: handle to be passed by callback
0019  * @completion_notify: callback to notify when all the adapters are created
0020  */
0021 struct mlxcpld_mux_plat_data {
0022     int *chan_ids;
0023     int num_adaps;
0024     int sel_reg_addr;
0025     u8 reg_size;
0026     void *handle;
0027     int (*completion_notify)(void *handle, struct i2c_adapter *parent,
0028                  struct i2c_adapter *adapters[]);
0029 };
0030 
0031 #endif /* _LINUX_I2C_MLXCPLD_H */