From a39bd92e92b96d05d676fb5c9493cf1c911d2a0a Mon Sep 17 00:00:00 2001 From: Vadim Pasternak Date: Mon, 8 Feb 2021 22:16:06 +0200 Subject: i2c: mux: mlxcpld: Add callback to notify mux creation completion Add notification to inform caller that mux objects array has been created. It allows to user, invoked platform device registration for "i2c-mux-mlxcpld" driver, to be notified that mux infrastructure is available, and thus some devices could be connected to this infrastructure. Signed-off-by: Vadim Pasternak Acked-by: Peter Rosin Signed-off-by: Wolfram Sang --- include/linux/platform_data/mlxcpld.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/linux') diff --git a/include/linux/platform_data/mlxcpld.h b/include/linux/platform_data/mlxcpld.h index a7bee798d991..d7610b528856 100644 --- a/include/linux/platform_data/mlxcpld.h +++ b/include/linux/platform_data/mlxcpld.h @@ -15,12 +15,17 @@ * @num_adaps - number of adapters * @sel_reg_addr - mux select register offset in CPLD space * @reg_size: register size in bytes + * @handle: handle to be passed by callback + * @completion_notify: callback to notify when all the adapters are created */ struct mlxcpld_mux_plat_data { int *chan_ids; int num_adaps; int sel_reg_addr; u8 reg_size; + void *handle; + int (*completion_notify)(void *handle, struct i2c_adapter *parent, + struct i2c_adapter *adapters[]); }; #endif /* _LINUX_I2C_MLXCPLD_H */ -- cgit v1.2.3