public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH i2c-next 1/1] i2c: mlxcpld: Add callback to notify probing completion
@ 2022-07-13  9:11 Vadim Pasternak
  2022-07-16 12:51 ` Wolfram Sang
  0 siblings, 1 reply; 2+ messages in thread
From: Vadim Pasternak @ 2022-07-13  9:11 UTC (permalink / raw)
  To: wsa; +Cc: linux-i2c, Vadim Pasternak

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>
---
 drivers/i2c/busses/i2c-mlxcpld.c | 4 ++++
 1 file changed, 4 insertions(+)

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:
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH i2c-next 1/1] i2c: mlxcpld: Add callback to notify probing completion
  2022-07-13  9:11 [PATCH i2c-next 1/1] i2c: mlxcpld: Add callback to notify probing completion Vadim Pasternak
@ 2022-07-16 12:51 ` Wolfram Sang
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2022-07-16 12:51 UTC (permalink / raw)
  To: Vadim Pasternak; +Cc: linux-i2c

[-- Attachment #1: Type: text/plain, Size: 426 bytes --]

On Wed, Jul 13, 2022 at 12:11:36PM +0300, Vadim Pasternak wrote:
> 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>

Applied to for-next, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-16 12:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-13  9:11 [PATCH i2c-next 1/1] i2c: mlxcpld: Add callback to notify probing completion Vadim Pasternak
2022-07-16 12:51 ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox