tools: gpio: fix debounce_period_us output of lsgpio
authorMilo Spadacini <milo.spadacini@gmail.com>
Mon, 8 May 2023 13:18:48 +0000 (15:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Jun 2023 14:00:52 +0000 (16:00 +0200)
commit79a0a3695e011cf79a561d419145f07f115ddd64
tree5b28f641ac70e117c66309be638265e5cfeea68f
parentcc1444a3639838fd1db60ccc84ff024f619b31af
tools: gpio: fix debounce_period_us output of lsgpio

[ Upstream commit eb4b8eca1bad98f4b8574558a74f041f9acb5a54 ]

Fix incorrect output that could occur when more attributes are used and
GPIO_V2_LINE_ATTR_ID_DEBOUNCE is not the first one.

Signed-off-by: Milo Spadacini <milo.spadacini@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/gpio/lsgpio.c