[PATCH v12 11/11] gpio: pl061: tidy up IRQ trigger logging
From: Long Zhao via B4 Relay
Date: Tue Oct 27 2026 - 00:23:11 EST
From: Long Zhao <longzhao@xxxxxxxxxxxxx>
Join the level-and-edge dev_err() into one string literal so a grep
for "edge detection" finds it.
Use str_high_low() for the level debug line. str_rising_falling()
is not in linux-next, so the edge debug line keeps its own text.
Suggested-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Signed-off-by: Long Zhao <longzhao@xxxxxxxxxxxxx>
---
drivers/gpio/gpio-pl061.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpio/gpio-pl061.c b/drivers/gpio/gpio-pl061.c
index 0fb42c531451..1d77afd8c409 100644
--- a/drivers/gpio/gpio-pl061.c
+++ b/drivers/gpio/gpio-pl061.c
@@ -26,6 +26,7 @@
#include <linux/regmap.h>
#include <linux/seq_file.h>
#include <linux/spinlock.h>
+#include <linux/string_choices.h>
#define GPIODIR 0x400
#define GPIOIS 0x404
@@ -171,8 +172,7 @@ static int pl061_irq_type(struct irq_data *d, unsigned trigger)
if ((trigger & IRQ_TYPE_LEVEL_MASK) && (trigger & IRQ_TYPE_EDGE_BOTH)) {
dev_err(parent,
- "trying to configure line %d for both level and edge "
- "detection, choose one!\n",
+ "trying to configure line %d for both level and edge detection, choose one!\n",
offset);
return -EINVAL;
}
@@ -198,7 +198,7 @@ static int pl061_irq_type(struct irq_data *d, unsigned trigger)
irq_set_handler_locked(d, handle_level_irq);
dev_dbg(parent, "line %d: IRQ on %s level\n",
offset,
- polarity ? "HIGH" : "LOW");
+ str_high_low(polarity));
} else if ((trigger & IRQ_TYPE_EDGE_BOTH) == IRQ_TYPE_EDGE_BOTH) {
/* Disable level detection */
gpiois &= ~bit;
--
2.34.1