[PATCH v14 14/14] gpio: pl061: use string_choices helpers for IRQ trigger logging
From: Long Zhao via B4 Relay
Date: Mon Nov 09 2026 - 23:52:02 EST
From: Long Zhao <longzhao@xxxxxxxxxxxxx>
Use str_high_low() and str_rising_falling() for the level and edge
debug lines.
Suggested-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Signed-off-by: Long Zhao <longzhao@xxxxxxxxxxxxx>
---
drivers/gpio/gpio-pl061.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/gpio/gpio-pl061.c b/drivers/gpio/gpio-pl061.c
index 63ec5363dd5f..86c22378e759 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
@@ -195,8 +196,7 @@ static int pl061_irq_type(struct irq_data *d, unsigned trigger)
gpioiev &= ~bit;
irq_set_handler_locked(d, handle_level_irq);
dev_dbg(parent, "line %d: IRQ on %s level\n",
- offset,
- polarity ? "HIGH" : "LOW");
+ offset, str_high_low(polarity));
} else if ((trigger & IRQ_TYPE_EDGE_BOTH) == IRQ_TYPE_EDGE_BOTH) {
/* Disable level detection */
gpiois &= ~bit;
@@ -219,8 +219,7 @@ static int pl061_irq_type(struct irq_data *d, unsigned trigger)
gpioiev &= ~bit;
irq_set_handler_locked(d, handle_edge_irq);
dev_dbg(parent, "line %d: IRQ on %s edge\n",
- offset,
- rising ? "RISING" : "FALLING");
+ offset, str_rising_falling(rising));
} else {
/* No trigger: disable everything */
gpiois &= ~bit;
--
2.34.1