* [PATCH AUTOSEL 6.1 10/24] pinctrl: amd: Fix debug output for debounce time
[not found] <20230215204547.2760761-1-sashal@kernel.org>
@ 2023-02-15 20:45 ` Sasha Levin
0 siblings, 0 replies; only message in thread
From: Sasha Levin @ 2023-02-15 20:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Mario Limonciello, Linus Walleij, Sasha Levin, Basavaraj.Natikar,
Shyam-sundar.S-k, linux-gpio
From: Mario Limonciello <mario.limonciello@amd.com>
[ Upstream commit c6e0679b8381bf03315e6660cf5370f916c1a1c6 ]
If one GPIO has debounce enabled but future GPIOs in the list don't
have debounce the time never gets reset and shows wrong value.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20230121134812.16637-2-mario.limonciello@amd.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/pinctrl/pinctrl-amd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c
index 9bc6e3922e78e..32c3edaf90385 100644
--- a/drivers/pinctrl/pinctrl-amd.c
+++ b/drivers/pinctrl/pinctrl-amd.c
@@ -365,6 +365,7 @@ static void amd_gpio_dbg_show(struct seq_file *s, struct gpio_chip *gc)
} else {
debounce_enable = " ∅";
+ time = 0;
}
snprintf(debounce_value, sizeof(debounce_value), "%u", time * unit);
seq_printf(s, "debounce %s (🕑 %sus)| ", debounce_enable, debounce_value);
--
2.39.0
^ permalink raw reply related [flat|nested] only message in thread