diff options
author | Vadim Pasternak <vadimp@nvidia.com> | 2022-07-13 12:11:36 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2022-07-16 14:50:02 +0200 |
commit | 1f438d2318f4b8012b3153130cf6b0259c76c8d6 (patch) | |
tree | ded867fc61dc905fc58352b6b2b619d23c02ad1f /drivers/i2c | |
parent | 9ae551ded5ba55f96a83cd0811f7ef8c2f329d0c (diff) | |
download | linux-1f438d2318f4b8012b3153130cf6b0259c76c8d6.tar.gz linux-1f438d2318f4b8012b3153130cf6b0259c76c8d6.tar.bz2 linux-1f438d2318f4b8012b3153130cf6b0259c76c8d6.zip |
i2c: mlxcpld: Add callback to notify probing completion
Add notification to inform caller that driver probing has been
completed. It allows to user, invoked platform device registration for
"i2c-mlxcpld" driver, to be notified that bus adapter is available, and
thus some devices could be connected to this bus.
Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-mlxcpld.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-mlxcpld.c b/drivers/i2c/busses/i2c-mlxcpld.c index 56aa424fd71d..363ea9fd66c4 100644 --- a/drivers/i2c/busses/i2c-mlxcpld.c +++ b/drivers/i2c/busses/i2c-mlxcpld.c @@ -560,6 +560,10 @@ static int mlxcpld_i2c_probe(struct platform_device *pdev) if (err) goto mlxcpld_i2_probe_failed; + /* Notify caller when adapter is added. */ + if (pdata && pdata->completion_notify) + pdata->completion_notify(pdata->handle, mlxcpld_i2c_adapter.nr); + return 0; mlxcpld_i2_probe_failed: |