public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c: core: add useful info when defer probe
@ 2025-05-07 10:27 Xu Yang
  2025-05-08  2:51 ` Carlos Song
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Xu Yang @ 2025-05-07 10:27 UTC (permalink / raw)
  To: wsa+renesas; +Cc: linux-i2c, imx

Add an useful info when failed to get irq/wakeirq due to -EPROBE_DEFER.

Before:
[   15.737361] i2c 2-0050: deferred probe pending: (reason unknown)

After:
[   15.816295] i2c 2-0050: deferred probe pending: tcpci: can't get irq

Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
---
 drivers/i2c/i2c-core-base.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index dc3c60a7d382..32ffd12bff9f 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -520,7 +520,7 @@ static int i2c_device_probe(struct device *dev)
 				client->flags |= I2C_CLIENT_WAKE;
 		}
 		if (irq == -EPROBE_DEFER) {
-			status = irq;
+			status = dev_err_probe(dev, irq, "can't get irq\n");
 			goto put_sync_adapter;
 		}
 
@@ -548,7 +548,7 @@ static int i2c_device_probe(struct device *dev)
 
 		wakeirq = fwnode_irq_get_byname(fwnode, "wakeup");
 		if (wakeirq == -EPROBE_DEFER) {
-			status = wakeirq;
+			status = dev_err_probe(dev, wakeirq, "can't get wakeirq\n");
 			goto put_sync_adapter;
 		}
 
-- 
2.34.1


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

end of thread, other threads:[~2025-05-19 20:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-07 10:27 [PATCH] i2c: core: add useful info when defer probe Xu Yang
2025-05-08  2:51 ` Carlos Song
2025-05-19 16:34 ` Wolfram Sang
2025-05-19 20:29 ` Frank Li

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