Re: [PATCH libgpiod-v2] gpioinfo: Show edge detection and debounce period if enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 22, 2021 at 1:49 PM Ben Hutchings
<ben.hutchings@xxxxxxxxxxxxx> wrote:
>
> On Mon, Sep 20, 2021 at 03:52:17PM +0200, Bartosz Golaszewski wrote:
> > On Thu, Jul 29, 2021 at 1:46 AM Ben Hutchings <ben.hutchings@xxxxxxx> wrote:
> [...]
> > > @@ -166,6 +196,9 @@ static void list_lines(struct gpiod_chip *chip)
> > >                 prinfo(&of, 13, "%s ",
> > >                        active_low ? "active-low" : "active-high");
> > >
> > > +               if (debounce_period)
> > > +                       printf("debounce=%lu ", debounce_period);
> >
> > You should use prinfo here for formatting. But it would be even better
> > if this became a flag - like the bias, drive etc settings and be shown
> > inside the [] brackets at the end of the line - something like:
> > "[pull-up, used, debounce-period=1000us]".
> [...]
>
> Well it's not a flag; it's an attribute with a value.  But if you
> think it should be grouped with the flags anyway, I can do that.
>

Yeah "flags" may be an unfortunate word. I should probably have called
the last column: optional attributes. Now that we have a growing
number of line attributes, I should probably rethink gpioinfo output
formatting for v2.

Bart



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux