All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pinctrl: qcom: spmi-gpio: Reorder debug print
@ 2019-02-19 19:12 Bjorn Andersson
  2019-02-21 12:15 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Bjorn Andersson @ 2019-02-19 19:12 UTC (permalink / raw)
  To: Bjorn Andersson, Linus Walleij
  Cc: Andy Gross, David Brown, linux-arm-msm, linux-gpio, linux-kernel

It's reasonable to expect that people turn to the "gpio" debugfs file to
first and foremost learn about the direction and value of a gpio, and
second to that about it's pinconf. So reorder the value so each line
reads:

gpioN: direction value ...

This also makes it consistent with the TLMM pinctrl driver's output in
the same dump.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
index cb512c7a5251..76e57ae2f6e8 100644
--- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
+++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
@@ -675,11 +675,11 @@ static void pmic_gpio_config_dbg_show(struct pinctrl_dev *pctldev,
 		else
 			seq_printf(s, " %-4s",
 					pad->output_enabled ? "out" : "in");
+		seq_printf(s, " %-4s", pad->out_value ? "high" : "low");
 		seq_printf(s, " %-7s", pmic_gpio_functions[function]);
 		seq_printf(s, " vin-%d", pad->power_source);
 		seq_printf(s, " %-27s", biases[pad->pullup]);
 		seq_printf(s, " %-10s", buffer_types[pad->buffer_type]);
-		seq_printf(s, " %-4s", pad->out_value ? "high" : "low");
 		seq_printf(s, " %-7s", strengths[pad->strength]);
 		seq_printf(s, " atest-%d", pad->atest);
 		seq_printf(s, " dtest-%d", pad->dtest_buffer);
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] pinctrl: qcom: spmi-gpio: Reorder debug print
  2019-02-19 19:12 [PATCH] pinctrl: qcom: spmi-gpio: Reorder debug print Bjorn Andersson
@ 2019-02-21 12:15 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2019-02-21 12:15 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, David Brown, linux-arm-msm, open list:GPIO SUBSYSTEM,
	linux-kernel

On Tue, Feb 19, 2019 at 8:12 PM Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:

> It's reasonable to expect that people turn to the "gpio" debugfs file to
> first and foremost learn about the direction and value of a gpio, and
> second to that about it's pinconf. So reorder the value so each line
> reads:
>
> gpioN: direction value ...
>
> This also makes it consistent with the TLMM pinctrl driver's output in
> the same dump.
>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-02-21 12:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-19 19:12 [PATCH] pinctrl: qcom: spmi-gpio: Reorder debug print Bjorn Andersson
2019-02-21 12:15 ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.