linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] gpio: add new SET_CONFIG ioctl() to gpio chardev
@ 2019-10-31 14:48 Kent Gibson
  2019-10-31 14:48 ` [PATCH v2 1/2] gpiolib: move validation of line handle flags into helper function Kent Gibson
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Kent Gibson @ 2019-10-31 14:48 UTC (permalink / raw)
  To: linux-gpio, bgolaszewski, linus.walleij; +Cc: Kent Gibson

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-11-02 23:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-31 14:48 [PATCH v2 0/2] gpio: add new SET_CONFIG ioctl() to gpio chardev Kent Gibson
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

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).