* [PATCH v3] tools: gpio: fix debounce_period_us output of lsgpio
@ 2023-05-08 13:18 Milo Spadacini
2023-05-08 13:46 ` Linus Walleij
2023-05-11 8:56 ` Bartosz Golaszewski
0 siblings, 2 replies; 4+ messages in thread
From: Milo Spadacini @ 2023-05-08 13:18 UTC (permalink / raw)
To: linus.walleij, brgl, linux-gpio, warthog618, andy.shevchenko
Cc: Milo Spadacini
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>
---
V2 -> V3 add signature
V1 -> V2 fix commit syntax
---
tools/gpio/lsgpio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/gpio/lsgpio.c b/tools/gpio/lsgpio.c
index c61d061247e1..52a0be45410c 100644
--- a/tools/gpio/lsgpio.c
+++ b/tools/gpio/lsgpio.c
@@ -94,7 +94,7 @@ static void print_attributes(struct gpio_v2_line_info *info)
for (i = 0; i < info->num_attrs; i++) {
if (info->attrs[i].id == GPIO_V2_LINE_ATTR_ID_DEBOUNCE)
fprintf(stdout, ", debounce_period=%dusec",
- info->attrs[0].debounce_period_us);
+ info->attrs[i].debounce_period_us);
}
}
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3] tools: gpio: fix debounce_period_us output of lsgpio
2023-05-08 13:18 [PATCH v3] tools: gpio: fix debounce_period_us output of lsgpio Milo Spadacini
@ 2023-05-08 13:46 ` Linus Walleij
2023-05-08 14:37 ` Andy Shevchenko
2023-05-11 8:56 ` Bartosz Golaszewski
1 sibling, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2023-05-08 13:46 UTC (permalink / raw)
To: Milo Spadacini; +Cc: brgl, linux-gpio, warthog618, andy.shevchenko
On Mon, May 8, 2023 at 3:20 PM Milo Spadacini <milo.spadacini@gmail.com> wrote:
> 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>
Thanks Milo!
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3] tools: gpio: fix debounce_period_us output of lsgpio
2023-05-08 13:46 ` Linus Walleij
@ 2023-05-08 14:37 ` Andy Shevchenko
0 siblings, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2023-05-08 14:37 UTC (permalink / raw)
To: Linus Walleij; +Cc: Milo Spadacini, brgl, linux-gpio, warthog618
On Mon, May 8, 2023 at 4:46 PM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> On Mon, May 8, 2023 at 3:20 PM Milo Spadacini <milo.spadacini@gmail.com> wrote:
>
> > 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>
I'm not sure if we need a Fixes tag, but anyway LGTM as well:
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Thanks Milo!
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3] tools: gpio: fix debounce_period_us output of lsgpio
2023-05-08 13:18 [PATCH v3] tools: gpio: fix debounce_period_us output of lsgpio Milo Spadacini
2023-05-08 13:46 ` Linus Walleij
@ 2023-05-11 8:56 ` Bartosz Golaszewski
1 sibling, 0 replies; 4+ messages in thread
From: Bartosz Golaszewski @ 2023-05-11 8:56 UTC (permalink / raw)
To: Milo Spadacini; +Cc: linus.walleij, linux-gpio, warthog618, andy.shevchenko
On Mon, May 8, 2023 at 3:20 PM Milo Spadacini <milo.spadacini@gmail.com> wrote:
>
> 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>
> ---
> V2 -> V3 add signature
> V1 -> V2 fix commit syntax
> ---
> tools/gpio/lsgpio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/gpio/lsgpio.c b/tools/gpio/lsgpio.c
> index c61d061247e1..52a0be45410c 100644
> --- a/tools/gpio/lsgpio.c
> +++ b/tools/gpio/lsgpio.c
> @@ -94,7 +94,7 @@ static void print_attributes(struct gpio_v2_line_info *info)
> for (i = 0; i < info->num_attrs; i++) {
> if (info->attrs[i].id == GPIO_V2_LINE_ATTR_ID_DEBOUNCE)
> fprintf(stdout, ", debounce_period=%dusec",
> - info->attrs[0].debounce_period_us);
> + info->attrs[i].debounce_period_us);
> }
> }
>
> --
> 2.34.1
>
Applied, thanks!
Bart
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-05-11 8:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-08 13:18 [PATCH v3] tools: gpio: fix debounce_period_us output of lsgpio Milo Spadacini
2023-05-08 13:46 ` Linus Walleij
2023-05-08 14:37 ` Andy Shevchenko
2023-05-11 8:56 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox