From: Mario Limonciello Date: Sat, 21 Jan 2023 13:48:10 +0000 (-0600) Subject: pinctrl: amd: Fix debug output for debounce time X-Git-Tag: v6.1.15~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=91210aca68f32c9c81587fbb711ff40ff11a144f;p=platform%2Fkernel%2Flinux-starfive.git pinctrl: amd: Fix debug output for debounce time [ 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 Link: https://lore.kernel.org/r/20230121134812.16637-2-mario.limonciello@amd.com Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c index 9bc6e39..32c3eda 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);