]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
i3c: mipi-i3c-hci: Change interrupt status prints to dev_dbg()
authorJarkko Nikula <jarkko.nikula@linux.intel.com>
Wed, 27 Aug 2025 10:30:05 +0000 (13:30 +0300)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Tue, 16 Sep 2025 15:06:42 +0000 (17:06 +0200)
Change interrupt status prints from local DBG() macro to dev_dbg() in
order to make it easier to enable them without needing to recompile code
with DEBUG defined.

While doing so, spell out the status register names as they are in the
specification to make it easier to differentiate between different
interrupt status registers.

Since dynamic debug prints can include the line number remove the "(in)"
and "(out)" markers from the PIO interrupt status prints.

Prefix the ring interrupt status print using "Ring %d" instead of "rh%d"
to make it uniform across all other prints showing the ring number.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20250827103009.243771-2-jarkko.nikula@linux.intel.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/i3c/master/mipi-i3c-hci/core.c
drivers/i3c/master/mipi-i3c-hci/dma.c
drivers/i3c/master/mipi-i3c-hci/pio.c

index 7a467ef657870a6f4a3aa72c9245ff8bfda2e6f3..d532933ac7ab01981af8bd0cce3661d6d9aee47a 100644 (file)
@@ -553,7 +553,7 @@ static irqreturn_t i3c_hci_irq_handler(int irq, void *dev_id)
 
        val = reg_read(INTR_STATUS);
        reg_write(INTR_STATUS, val);
-       DBG("INTR_STATUS = %#x", val);
+       dev_dbg(&hci->master.dev, "INTR_STATUS %#x", val);
 
        if (val)
                result = IRQ_HANDLED;
index 09688ada4912bfecbca5e0a8587675825a7e6da7..f5f5ab4db172e873e85a6a77558439a00e586a86 100644 (file)
@@ -760,7 +760,8 @@ static bool hci_dma_irq_handler(struct i3c_hci *hci)
 
                rh = &rings->headers[i];
                status = rh_reg_read(INTR_STATUS);
-               DBG("rh%d status: %#x", i, status);
+               dev_dbg(&hci->master.dev, "Ring %d: RH_INTR_STATUS %#x",
+                       i, status);
                if (!status)
                        continue;
                rh_reg_write(INTR_STATUS, status);
index 2fc71e6969111ae2538047fa5fce1f242ecb2d1e..cde883137bc756a220840b1f63243b3c9c81944f 100644 (file)
@@ -986,7 +986,8 @@ static bool hci_pio_irq_handler(struct i3c_hci *hci)
 
        spin_lock(&pio->lock);
        status = pio_reg_read(INTR_STATUS);
-       DBG("(in) status: %#x/%#x", status, pio->enabled_irqs);
+       dev_dbg(&hci->master.dev, "PIO_INTR_STATUS %#x/%#x",
+               status, pio->enabled_irqs);
        status &= pio->enabled_irqs | STAT_LATENCY_WARNINGS;
        if (!status) {
                spin_unlock(&pio->lock);
@@ -1023,8 +1024,8 @@ static bool hci_pio_irq_handler(struct i3c_hci *hci)
                        pio->enabled_irqs &= ~STAT_CMD_QUEUE_READY;
 
        pio_reg_write(INTR_SIGNAL_ENABLE, pio->enabled_irqs);
-       DBG("(out) status: %#x/%#x",
-           pio_reg_read(INTR_STATUS), pio_reg_read(INTR_SIGNAL_ENABLE));
+       dev_dbg(&hci->master.dev, "PIO_INTR_STATUS %#x/%#x",
+               pio_reg_read(INTR_STATUS), pio_reg_read(INTR_SIGNAL_ENABLE));
        spin_unlock(&pio->lock);
        return true;
 }