Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1631497

Re: [PATCH v2 2/4] gpio - Add EXAR XRA1403 SPI GPIO expander driver

From Linus Walleij <linus.walleij@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 2/4] gpio - Add EXAR XRA1403 SPI GPIO expander driver
Date 2017-04-26 16:50 +0200
Message-ID <tAwqt-3Ay-9@gated-at.bofh.it> (permalink)
References <tvKaK-1Dy-5@gated-at.bofh.it> <tvKaK-1Dy-3@gated-at.bofh.it> <tzMxj-7FA-9@gated-at.bofh.it> <tA2LN-1un-39@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Apr 25, 2017 at 9:07 AM, Benjamin Henrion <zoobab@gmail.com> wrote:

> I doubt you will be able to convince the majority of people toggling
> GPIOs via a simple shell script to switch to write a complex C
> program. Not to mention cross compilation and the libraries
> dependencies here.

I do not need to convince anyone, I'm not into politics.

The way to attract users to the character device is by offering better
features... so we smack in the following goodies:

- Need a userspace ABI? No more need to select CONFIG_GPIO_SYSFS!
  The chardev is always there for any gpio chip in newer kernels!
  Board vendors would have to actively delete core code to disable it!

- Need open drain? The chardev will support that, the sysfs will never.

- Need to set/get multiple lines with a single context switch? Chardev
  does this. Also the set operation will turn into a single register write
  if your driver implements .set_multiple()

- All future needs: line biasing? Schmitt triggers? Drive strengths?
  All that will use the character device, and the sysfs ABI will never
  support any of it.

> Is there some good cli tools to access the new char device? If they
> are shipped with most distros, that would reduce the pain.

I have those that come with the kernel:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/gpio

Then libgpiod as mentioned:
https://github.com/brgl/libgpiod/tree/master/src/tools

Yours,
Linus Walleij

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH v2 2/4] gpio - Add EXAR XRA1403 SPI GPIO expander driver Benjamin Henrion <zoobab@gmail.com> - 2017-04-25 09:10 +0200
  Re: [PATCH v2 2/4] gpio - Add EXAR XRA1403 SPI GPIO expander driver Geert Uytterhoeven <geert@linux-m68k.org> - 2017-04-25 09:20 +0200
    Re: [PATCH v2 2/4] gpio - Add EXAR XRA1403 SPI GPIO expander driver Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-04-26 20:00 +0200
  Re: [PATCH v2 2/4] gpio - Add EXAR XRA1403 SPI GPIO expander driver Linus Walleij <linus.walleij@linaro.org> - 2017-04-26 16:50 +0200

csiph-web