From: Linus Walleij <linus.walleij@linaro.org>
To: Benjamin Henrion <zoobab@gmail.com>
Cc: Nandor Han <nandor.han@ge.com>,
Greg KH <gregkh@linuxfoundation.org>,
"David S. Miller" <davem@davemloft.net>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
Alexandre Courbot <gnurou@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Semi Malinen <semi.malinen@ge.com>
Subject: Re: [PATCH v2 2/4] gpio - Add EXAR XRA1403 SPI GPIO expander driver
Date: Wed, 26 Apr 2017 16:42:18 +0200 [thread overview]
Message-ID: <CACRpkdb82RLyjTW8t-bWynSQH0tV2dnrq9AfefQfKzTEt_TFPw@mail.gmail.com> (raw)
In-Reply-To: <CANjd3ndZkVi5OA0eqDewrpqVLQpT11QbVOA98F=ghMhcwPu2hQ@mail.gmail.com>
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
next prev parent reply other threads:[~2017-04-26 14:42 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-13 10:27 [PATCH v2 0/4] XRA1403,gpio - add XRA1403 gpio expander driver Nandor Han
2017-04-13 10:27 ` [PATCH v2 1/4] dt-bindings: gpio - add exar to vendor prefixes list Nandor Han
2017-04-19 21:48 ` Rob Herring
2017-04-24 13:19 ` Linus Walleij
2017-04-13 10:27 ` [PATCH v2 2/4] gpio - Add EXAR XRA1403 SPI GPIO expander driver Nandor Han
2017-04-13 16:22 ` kbuild test robot
2017-04-24 13:47 ` Linus Walleij
2017-04-24 13:53 ` Han, Nandor (GE Healthcare)
2017-04-25 7:07 ` Benjamin Henrion
2017-04-25 7:15 ` Geert Uytterhoeven
2017-04-26 17:50 ` Andy Shevchenko
2017-04-26 14:42 ` Linus Walleij [this message]
2017-04-13 10:27 ` [PATCH v2 3/4] doc,dts - add XRA1403 DTS binding documentation Nandor Han
2017-04-19 21:55 ` Rob Herring
2017-04-24 13:49 ` Linus Walleij
2017-04-13 10:27 ` [PATCH v2 4/4] Add XRA1403 support to MAINTAINERS file Nandor Han
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CACRpkdb82RLyjTW8t-bWynSQH0tV2dnrq9AfefQfKzTEt_TFPw@mail.gmail.com \
--to=linus.walleij@linaro.org \
--cc=daniel.vetter@ffwll.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=geert@linux-m68k.org \
--cc=gnurou@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mchehab@kernel.org \
--cc=nandor.han@ge.com \
--cc=robh+dt@kernel.org \
--cc=semi.malinen@ge.com \
--cc=zoobab@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).