aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Limonciello <[email protected]>2023-01-21 07:48:10 -0600
committerLinus Walleij <[email protected]>2023-01-27 13:40:29 +0100
commitc6e0679b8381bf03315e6660cf5370f916c1a1c6 (patch)
treecd80855f0912d2bd9f59740c771f5a3906622537
parent287a344a11f1ebd31055cf9b22c88d7005f108d7 (diff)
pinctrl: amd: Fix debug output for debounce time
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
-rw-r--r--drivers/pinctrl/pinctrl-amd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c
index 9bc6e3922e78..32c3edaf9038 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);