summaryrefslogtreecommitdiff
path: root/drivers/i2c/i2c-core-base.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2024-07-04 05:28:59 +0200
committerWolfram Sang <wsa+renesas@sang-engineering.com>2024-07-10 08:31:59 +0200
commit500c20fe3ea4a241f7ea58a414343367ab2e4085 (patch)
treecb6802dea56fd2734e2488aa0cfc4dfb527b14ba /drivers/i2c/i2c-core-base.c
parent711703013e340caac3e4a6a3a605324691292621 (diff)
downloadlinux-500c20fe3ea4a241f7ea58a414343367ab2e4085.tar.gz
linux-500c20fe3ea4a241f7ea58a414343367ab2e4085.tar.bz2
linux-500c20fe3ea4a241f7ea58a414343367ab2e4085.zip
i2c: add debug message for detected HostNotify alerts
Setting up HostNotify can be tricky. Support debugging by stating when a HostNotify alert was received independent of the irq being mapped. Especially useful with the in-kernel i2c testunit. Update documentation as well. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Diffstat (limited to 'drivers/i2c/i2c-core-base.c')
-rw-r--r--drivers/i2c/i2c-core-base.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index 49fdcb3eb8f6..a5fce479ab13 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;