From: Kent Gibson <warthog618@gmail.com>
To: linux-gpio@vger.kernel.org, bgolaszewski@baylibre.com,
linus.walleij@linaro.org
Cc: Kent Gibson <warthog618@gmail.com>
Subject: [PATCH v2 0/2] gpio: add new SET_CONFIG ioctl() to gpio chardev
Date: Thu, 31 Oct 2019 22:48:23 +0800 [thread overview]
Message-ID: <20191031144825.32105-1-warthog618@gmail.com> (raw)
Changes from v1:
Address v1 review comments, specifically refactoring line handle flag
validation out of linehandle_create in a separate patch, and refactoring
the set_config itself to improve readability and minimize changes to
existing code.
Add the GPIOHANDLE_SET_CONFIG_IOCTL to the gpio chardev.
The ioctl allows some of the configuration of a requested handle to be
changed without having to release the line.
The primary use case is the changing of direction for bi-directional
lines.
The patch series is against Bart's gpio/for-next branch[1] with v4 of
my bias patch series "gpio: expose line bias flags to userspace" applied.
This is necessary to support setting of the bias flags introduced
there.
The patch has been successfully tested against gpio-mockup using the
feature/pud_set_config branch of my Go gpiod library[2], as libgpiod has
not yet been updated with the uAPI change.
Kent Gibson (2):
gpiolib: move validation of line handle flags into helper function
gpio: add new SET_CONFIG ioctl() to gpio chardev
drivers/gpio/gpiolib.c | 162 ++++++++++++++++++++++++++++----------
include/uapi/linux/gpio.h | 18 +++++
2 files changed, 138 insertions(+), 42 deletions(-)
--
2.23.0
[1] git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git
[2] https://github.com/warthog618/gpiod.git
next reply other threads:[~2019-10-31 14:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-31 14:48 Kent Gibson [this message]
2019-10-31 14:48 ` [PATCH v2 1/2] gpiolib: move validation of line handle flags into helper function Kent Gibson
2019-10-31 14:48 ` [PATCH v2 2/2] gpio: add new SET_CONFIG ioctl() to gpio chardev Kent Gibson
2019-11-02 21:02 ` [PATCH v2 0/2] " Drew Fustini
2019-11-02 23:14 ` Kent Gibson
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=20191031144825.32105-1-warthog618@gmail.com \
--to=warthog618@gmail.com \
--cc=bgolaszewski@baylibre.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
/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).