summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2015-08-11 17:11:29 +0200
committerLinus Walleij <linus.walleij@linaro.org>2015-08-11 17:12:57 +0200
commitd7f005e8392e41014864b717e00a0777ebcfc64e (patch)
treee5e61c8fb75d64703b067ccf32699ddaa6a041ef /drivers
parentpinctrl: join dev_dbg strings into a single line (diff)
downloadlinux-d7f005e8392e41014864b717e00a0777ebcfc64e.tar.xz
linux-d7f005e8392e41014864b717e00a0777ebcfc64e.zip
pinctrl: nomadik: reflect current input value
Let us see the current value on the input line in debugfs. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pinctrl/nomadik/pinctrl-nomadik.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/pinctrl/nomadik/pinctrl-nomadik.c b/drivers/pinctrl/nomadik/pinctrl-nomadik.c
index 181fa546b298..352ede13a9e9 100644
--- a/drivers/pinctrl/nomadik/pinctrl-nomadik.c
+++ b/drivers/pinctrl/nomadik/pinctrl-nomadik.c
@@ -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".