Re: [libgpiod PATCH] gpioget: Add --line-name to lookup GPIO line

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

 



On Fri, 3 Dec 2021 at 10:18, Bartosz Golaszewski <brgl@xxxxxxxx> wrote:
>
> > > My two cents: like Jeremy, I would very much welcome the ability to
> > > specify GPIOs by name instead of number, but the one-line-only
> > > limitation does seem unfortunate.  How about making a command-line flag
> > > that just means "line-specifier arguments should be interpreted as names
> > > instead of numbers"?
> > >
> > > So you could do:
> > >
> > >   $ gpioget --by-name chassis-intrusion cpu1-prochot
> > >   0 1
> > >
> > >   $ gpioset --by-name led-green=1 led-red=0
>
> I like this more - that way we either allow offsets or names. Please
> make sure corner cases are covered. If you can add this to other tools
> too, I'm fine with that, but put the name lookup code into
> tools-common.c please. I would also like to see bats test cases
> covering this.

Good plan. Thanks Jeremy, Zev, Andrew and Bart. I'll get hacking.

Cheers,

Joel



[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