gpio: expose pull-up/pull-down line flags to userspace
authorDrew Fustini <drew@pdp7.com>
Tue, 5 Nov 2019 02:04:23 +0000 (10:04 +0800)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Tue, 12 Nov 2019 15:30:30 +0000 (16:30 +0100)
commit9225d5169d110734099a82c39c073a11e399cb3f
treece801bf8c51d4dc21533dca65d8c2f8d87562a2a
parentf932a68695e4c7d92e721d2c23580d9f35494662
gpio: expose pull-up/pull-down line flags to userspace

Add pull-up/pull-down flags to the gpio line get and
set ioctl() calls.  Use cases include a push button
that does not have an external resistor.

Addition use cases described by Limor Fried (ladyada) of
Adafruit in this PR for Adafruit_Blinka Python lib:
https://github.com/adafruit/Adafruit_Blinka/pull/59

Signed-off-by: Drew Fustini <drew@pdp7.com>
[Kent: added BIAS to GPIO flag names and restrict application to input
lines]
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