Skip to contentSkip to conversation

i2c: mlxcpld: Add callback to notify probing completion

PATCH Applied Vadim Pasternak 2 participants 2 messages Jul 13, 2022 – Jul 16, 2022

Subsystems (2)
lore
Share & tools
lore

Vadim Pasternak

author maintainer
#0 lore raw

PATCH 1/1 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.

---
 drivers/i2c/busses/i2c-mlxcpld.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/i2c/busses/i2c-mlxcpld.c +4 -0
index 56aa424fd71d..363ea9fd66c4 100644
@@ -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:
Signature · 1 line
2.20.1
Applied
#1 lore raw
Quoted 6 lines · 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.

Applied to for-next, thanks!