* [PATCH] pinctrl-baytrail: show pin label with the reset of the gpio debug data
@ 2013-11-22 12:01 Mathias Nyman
2013-11-22 12:33 ` Mika Westerberg
2013-12-02 14:36 ` Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: Mathias Nyman @ 2013-11-22 12:01 UTC (permalink / raw)
To: Linus; +Cc: linux-gpio, mika.westerberg, Mathias Nyman
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>
---
drivers/pinctrl/pinctrl-baytrail.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-baytrail.c b/drivers/pinctrl/pinctrl-baytrail.c
index 2832576..1174ea8 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)
spin_lock_irqsave(&vg->lock, flags);
for (i = 0; i < vg->chip.ngpio; i++) {
+ const char *label;
offs = vg->range->pins[i] * 16;
conf0 = readl(vg->reg_base + offs + BYT_CONF0_REG);
val = readl(vg->reg_base + offs + BYT_VAL_REG);
+ label = gpiochip_is_requested(chip, i);
+ if (!label)
+ label = "Unrequested";
+
seq_printf(s,
- " gpio-%-3d %s %s %s pad-%-3d offset:0x%03x mux:%d %s%s%s\n",
+ " gpio-%-3d (%-20.20s) %s %s %s pad-%-3d offset:0x%03x mux:%d %s%s%s\n",
i,
+ label,
val & BYT_INPUT_EN ? " " : "in",
val & BYT_OUTPUT_EN ? " " : "out",
val & BYT_LEVEL ? "hi" : "lo",
--
1.8.1.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] pinctrl-baytrail: show pin label with the reset of the gpio debug data
2013-11-22 12:01 [PATCH] pinctrl-baytrail: show pin label with the reset of the gpio debug data Mathias Nyman
@ 2013-11-22 12:33 ` Mika Westerberg
2013-12-02 14:36 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Mika Westerberg @ 2013-11-22 12:33 UTC (permalink / raw)
To: Mathias Nyman; +Cc: Linus, linux-gpio
On Fri, Nov 22, 2013 at 02:01:23PM +0200, Mathias Nyman wrote:
> 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>
Looks good to me,
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] pinctrl-baytrail: show pin label with the reset of the gpio debug data
2013-11-22 12:01 [PATCH] pinctrl-baytrail: show pin label with the reset of the gpio debug data Mathias Nyman
2013-11-22 12:33 ` Mika Westerberg
@ 2013-12-02 14:36 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2013-12-02 14:36 UTC (permalink / raw)
To: Mathias Nyman; +Cc: linux-gpio@vger.kernel.org, Mika Westerberg
On Fri, Nov 22, 2013 at 1:01 PM, Mathias Nyman
<mathias.nyman@linux.intel.com> wrote:
> 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>
Patch applied with Mika's tag.
Thanks!
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-12-02 14:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-22 12:01 [PATCH] pinctrl-baytrail: show pin label with the reset of the gpio debug data Mathias Nyman
2013-11-22 12:33 ` Mika Westerberg
2013-12-02 14:36 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).