gpio: add new SET_CONFIG ioctl() to gpio chardev
authorKent Gibson <warthog618@gmail.com>
Tue, 5 Nov 2019 02:04:29 +0000 (10:04 +0800)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Tue, 12 Nov 2019 15:30:31 +0000 (16:30 +0100)
commite588bb1eae31be73fbec2b731be986a7c09635a4
tree6dad3bb5d9f7e13813b63bd8459eb38df01219b1
parentb043ed7ef0b358d7f32dc57c218f925fd2802aba
gpio: add new SET_CONFIG ioctl() to gpio chardev

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.

Based on initial work by Bartosz Golaszewski <bgolaszewski@baylibre.com>

Signed-off-by: Kent Gibson <warthog618@gmail.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
drivers/gpio/gpiolib.c
include/uapi/linux/gpio.h