From: Xu Yang <xu.yang_2@nxp.com>
To: wsa+renesas@sang-engineering.com
Cc: linux-i2c@vger.kernel.org, imx@lists.linux.dev
Subject: [PATCH] i2c: core: add useful info when defer probe
Date: Wed, 7 May 2025 18:27:14 +0800 [thread overview]
Message-ID: <20250507102714.3535412-1-xu.yang_2@nxp.com> (raw)
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
next reply other threads:[~2025-05-07 10:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-07 10:27 Xu Yang [this message]
2025-05-08 2:51 ` [PATCH] i2c: core: add useful info when defer probe Carlos Song
2025-05-19 16:34 ` Wolfram Sang
2025-05-19 20:29 ` Frank Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250507102714.3535412-1-xu.yang_2@nxp.com \
--to=xu.yang_2@nxp.com \
--cc=imx@lists.linux.dev \
--cc=linux-i2c@vger.kernel.org \
--cc=wsa+renesas@sang-engineering.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox