R: [PATCH v2] gpiolib: Disallow identical line names in the same chip

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

 



Hi Geert,

> >
> > about the duplicate line names, what do you think
> > about adding to the command "gpiofind" of libgpiod tools,
> > the possibility to discover all the duplicate gpio lines?
> >
> > For example, something like the following:
> >
> > # gpiofind button_1
> > gpiochip0 20
> > gpiochip0 22 (duplicate)
> 
> This cannot happen, as the duplicate is on the same gpiochip.

Just a question:  I think that a duplicate name can be present
both in the same gpiochip and also in different gpiochips.
The same gpio line name can be wrongly present on different gpiochips,
for example caused by a mistake writing an ACPI table.

> 
> > gpiochip2 12 (duplicate)
> > #
> 
> I don't like the "(duplicate)" suffix.  It makes scripting harder (and
> more unsafe).
> What about outputting only the first one, unless "-a" is specified?
> 
> # gpiofind -a button_1
> gpiochip0 20
> gpiochip1 22
> gpiochip2 12
> #

Ok, I like the "-a" option!

> 
> Gr{oetje,eeting}s,
> 
>                         Geert

Best regards,
Flavio




[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