[PATCH v15 14/14] gpio: pl061: use string_choices helpers for IRQ trigger logging

From: Long Zhao via B4 Relay

Date: Wed Nov 18 2026 - 02:43:25 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>
Reviewed-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 332fa51f8ccf..47a804cea2de 100644
--- a/drivers/gpio/gpio-pl061.c
+++ b/drivers/gpio/gpio-pl061.c
@@ -27,6 +27,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
@@ -197,8 +198,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;
@@ -221,8 +221,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