linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tools: gpio: fix debounce_period_us output of lsgpio
@ 2023-05-04  9:22 Milo Spadacini
  2023-05-04 13:48 ` Kent Gibson
  2023-05-04 16:20 ` andy.shevchenko
  0 siblings, 2 replies; 5+ messages in thread
From: Milo Spadacini @ 2023-05-04  9:22 UTC (permalink / raw)
  To: linus.walleij, brgl, linux-gpio; +Cc: Milo Spadacini

Fix wrong output that could occurs when more attributes are used and
 GPIO_V2_LINE_ATTR_ID_DEBOUNCE is not the first one.
---
 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

[https://www.comelitgroup.com/firma/banner.jpg]<https://www.comelitgroup.com/it-it/cctv-advance-la-nuova-gamma-di-videosorveglianza-professionale-di-comelit>

NORME DI ACCESSO E DI COMPORTAMENTO PER ESTERNI<https://www.comelitgroup.com/it-it/norme-accesso-comportamento-esterni>

AVVISO DI CONFIDENZIALITÀ E PRIVACY
Questo messaggio ed i suoi eventuali allegati possono contenere informazioni confidenziali, di proprietà, legalmente protette. È destinato all'utilizzo esclusivo del destinatario sopra indicato; la natura privata e la confidenzialità non sono modificati da eventuali errori di trasmissione, pur avendo il mittente assunto tutte le misure di sicurezza idonee e preventive per evitarli. Il trattamento dei dati ivi contenuti, e quelli che verranno forniti in risposta, è realizzato in conformità alla normativa sulla privacy Reg 679/2016, potrete prendere visione della informativa anche visitando il sito www.comelitgroup.com ovvero sulle app Comelit. Rispondendo alla presente mail dichiarate di aver preso visione della richiamata informativa e di aver prestato il consenso al trattamento dei dati personali. Se il messaggio non è a lei destinato, non deve utilizzarlo, diffonderlo, copiarlo con qualunque mezzo, o intraprendere azioni basandosi su di esso. Se ha ricevuto questo messaggio per errore, la preghiamo di volerlo distruggere (unitamente ad eventuali copie dello stesso e suoi allegati) e di volerci cortesemente informare del fatto scrivendo al mittente.
CONFIDENTIALITY NOTICE AND PRIVACY
This message and its attachments (if any) may contain confidential, proprietary or legally privileged information and it is intended only for the use of the addressee named above. No confidentiality or privilege is waived or lost by any erroneous transmission, despite having taken all the security and preventative measures to avoid it. The processing of personal data contained therein, and those that will be provided in response, is made in compliance with the privacy regulation Reg 679/2016, you can also read the information by visiting www.comelitgroup.com or on Comelit apps. Responding to this email, you declare that you have read the aforementioned information and have given consent to the processing of personal data If you are not the intended recipient of this message, you are hereby notified that you must not use, disseminate, copy it in any form or take any action in reliance on it. If you have received this message in error, please, delete it (and any copies of it and attachment) and kindly inform the sender.

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-05-05 14:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CA+1hoUVnw7kXB15rzK=tQdX2cyGMoXEgThOiqA=pYDwqF6TAwQ@mail.gmail.com>
2023-05-05 11:32 ` [PATCH] tools: gpio: fix debounce_period_us output of lsgpio Linus Walleij
2023-05-05 14:18   ` Kent Gibson
2023-05-04  9:22 Milo Spadacini
2023-05-04 13:48 ` Kent Gibson
2023-05-04 16:20 ` andy.shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).