Skip to contentSkip to conversation

pinctrl: qcom: spmi-gpio: Reorder debug print

PATCH In review Bjorn Andersson 2 participants 2 messages Feb 19, 2019 – Feb 21, 2019

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pinctrl: qcom: spmi-gpio: Reorder debug print

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.

---
 drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c +1 -1
index cb512c7a5251..76e57ae2f6e8 100644
@@ -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);
Signature · 1 line
2.18.0
#1 lore raw
Quoted 11 lines · Bjorn Andersson

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.

Patch applied.

Yours,
Linus Walleij