Skip to content

Commit a4d8d6d

Browse files
matnymanLinus Walleij
authored andcommitted
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>
1 parent e9c9489 commit a4d8d6d

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎drivers/pinctrl/pinctrl-baytrail.c‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,13 +286,19 @@ static void byt_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
286286
spin_lock_irqsave(&vg->lock, flags);
287287

288288
for (i = 0; i < vg->chip.ngpio; i++) {
289+
const char *label;
289290
offs = vg->range->pins[i] * 16;
290291
conf0 = readl(vg->reg_base + offs + BYT_CONF0_REG);
291292
val = readl(vg->reg_base + offs + BYT_VAL_REG);
292293

294+
label = gpiochip_is_requested(chip, i);
295+
if (!label)
296+
label = "Unrequested";
297+
293298
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",
295300
i,
301+
label,
296302
val & BYT_INPUT_EN ? " " : "in",
297303
val & BYT_OUTPUT_EN ? " " : "out",
298304
val & BYT_LEVEL ? "hi" : "lo",

0 commit comments

Comments
 (0)