Skip to content
/ linux Public

Commit 1f438d2

Browse files
vadimp-nvidiawsakernel
authored andcommitted
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>
1 parent 9ae551d commit 1f438d2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/i2c/busses/i2c-mlxcpld.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,10 @@ static int mlxcpld_i2c_probe(struct platform_device *pdev)
560560
if (err)
561561
goto mlxcpld_i2_probe_failed;
562562

563+
/* Notify caller when adapter is added. */
564+
if (pdata && pdata->completion_notify)
565+
pdata->completion_notify(pdata->handle, mlxcpld_i2c_adapter.nr);
566+
563567
return 0;
564568

565569
mlxcpld_i2_probe_failed:

0 commit comments

Comments
 (0)