pinctrl: nomadik: reflect current input value
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 11 Aug 2015 15:11:29 +0000 (17:11 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 11 Aug 2015 15:12:57 +0000 (17:12 +0200)
Let us see the current value on the input line in debugfs.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/nomadik/pinctrl-nomadik.c

index 181fa546b2987f5cb9cdebebc3b7f34707b5e851..352ede13a9e9a33ab40868810ac4eef723c46035 100644 (file)
@@ -1010,6 +1010,7 @@ static void nmk_gpio_dbg_show_one(struct seq_file *s,
                int irq = gpio_to_irq(gpio);
                struct irq_desc *desc = irq_to_desc(irq);
                int pullidx = 0;
+               int val;
 
                if (pull)
                        pullidx = data_out ? 1 : 2;
@@ -1019,6 +1020,10 @@ static void nmk_gpio_dbg_show_one(struct seq_file *s,
                           label ?: "(none)",
                           pulls[pullidx],
                           (mode < 0) ? "unknown" : modes[mode]);
+
+               val = nmk_gpio_get_input(chip, offset);
+               seq_printf(s, " VAL %d", val);
+
                /*
                 * This races with request_irq(), set_irq_type(),
                 * and set_irq_wake() ... but those are "rare".