diff mbox series

i2c: add debug message for detected HostNotify alerts

Message ID 20240627124313.1811-2-wsa+renesas@sang-engineering.com (mailing list archive)
State Superseded
Delegated to: Geert Uytterhoeven
Headers show
Series i2c: add debug message for detected HostNotify alerts | expand

Commit Message

Wolfram Sang June 27, 2024, 12:43 p.m. UTC
Setting up HostNotify can be tricky. Support debugging by stating
whenever we received a HostNotify alert independent of the irq being
mapped. Especially useful with the in-kernel i2c testunit.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/i2c/i2c-core-base.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Andi Shyti June 27, 2024, 3:13 p.m. UTC | #1
Hi Wolfram,

On Thu, Jun 27, 2024 at 02:43:14PM GMT, Wolfram Sang wrote:
> Setting up HostNotify can be tricky. Support debugging by stating
> whenever we received a HostNotify alert independent of the irq being
> mapped. Especially useful with the in-kernel i2c testunit.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Andi Shyti <andi.shyti@kernel.org>

Thanks,
Andi
diff mbox series

Patch

diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index db0d1ac82910..b94594e90a66 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -1468,6 +1468,8 @@  int i2c_handle_smbus_host_notify(struct i2c_adapter *adap, unsigned short addr)
 	if (!adap)
 		return -EINVAL;
 
+	dev_dbg(&adap->dev, "Detected HostNotify from address 0x%02x", addr);
+
 	irq = irq_find_mapping(adap->host_notify_domain, addr);
 	if (irq <= 0)
 		return -ENXIO;