aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-baytrail.c
diff options
context:
space:
mode:
authorMathias Nyman <mathias.nyman@linux.intel.com>2013-11-22 07:01:23 -0500
committerLinus Walleij <linus.walleij@linaro.org>2013-12-03 04:08:46 -0500
commita4d8d6da4820230a2e0e977fda44ced9345c41d4 (patch)
treee20c81bfae7d5c23d1e23222db85ef3447f95c45 /drivers/pinctrl/pinctrl-baytrail.c
parente9c9489f1077880cb8332f3e1600bf8edba3e86a (diff)
pinctrl-baytrail: show pin label with the reset of the gpio debug data
The default gpiolib debug output shows pin labels. We want baytrail custom debug output to have the same functionality. Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-baytrail.c')
-rw-r--r--drivers/pinctrl/pinctrl-baytrail.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-baytrail.c b/drivers/pinctrl/pinctrl-baytrail.c
index 2832576d8b12..1174ea86b6e9 100644
--- a/drivers/pinctrl/pinctrl-baytrail.c
+++ b/drivers/pinctrl/pinctrl-baytrail.c
@@ -286,13 +286,19 @@ static void byt_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
286 spin_lock_irqsave(&vg->lock, flags); 286 spin_lock_irqsave(&vg->lock, flags);
287 287
288 for (i = 0; i < vg->chip.ngpio; i++) { 288 for (i = 0; i < vg->chip.ngpio; i++) {
289 const char *label;
289 offs = vg->range->pins[i] * 16; 290 offs = vg->range->pins[i] * 16;
290 conf0 = readl(vg->reg_base + offs + BYT_CONF0_REG); 291 conf0 = readl(vg->reg_base + offs + BYT_CONF0_REG);
291 val = readl(vg->reg_base + offs + BYT_VAL_REG); 292 val = readl(vg->reg_base + offs + BYT_VAL_REG);
292 293
294 label = gpiochip_is_requested(chip, i);
295 if (!label)
296 label = "Unrequested";
297
293 seq_printf(s, 298 seq_printf(s,
294 " gpio-%-3d %s %s %s pad-%-3d offset:0x%03x mux:%d %s%s%s\n", 299 " gpio-%-3d (%-20.20s) %s %s %s pad-%-3d offset:0x%03x mux:%d %s%s%s\n",
295 i, 300 i,
301 label,
296 val & BYT_INPUT_EN ? " " : "in", 302 val & BYT_INPUT_EN ? " " : "in",
297 val & BYT_OUTPUT_EN ? " " : "out", 303 val & BYT_OUTPUT_EN ? " " : "out",
298 val & BYT_LEVEL ? "hi" : "lo", 304 val & BYT_LEVEL ? "hi" : "lo",