This series adds gross control of pull-up/pull-down to the GPIO uAPI. Gross control means enabling and disabling of bias functionality, not finer grained control such as setting biasing impedances. The support allows both input and output lines to have any one of the following biases applied as part of the line handle or event request: 0. As Is - bias is left alone. This is the default for ABI compatibility. 1. Pull Up - pull-up bias is enabled. 2. Pull Down - pull-down bias is enabled. 3. Pull None - bias is explicitly disabled. The biases are encoded in two flags, PULL_UP and PULL_DOWN, where setting both is interpreted as Pull None. So the flags effectively form a two bit field encoding the values above. The setting of biases on output lines may seem odd, but is to allow for utilisation of internal pull-up/pull-down on open drain and open source outputs, where supported in hardware. Patches are against: github.com/brgl/linux/commit/82fc38f6ab599ee03f7a8ed078de8abb41e6e611 which contains the initial patch from Drew Fustini, with Bartosz Golaszewski, that adds support for pull-up/down flags in line handle requests. Patch 1 adds support to line event requests. Patch 2 adds pull-up/down support to the gpio-mockup for uAPI testing. Patch 3 rejects biasing changes to lines requested as-is. Patch 4 adds support for disabling bias (pull none). Patch 5 adds support for setting bias on output lines. Kent Gibson (5): gpiolib: add support for pull up/down to lineevent_create gpio: mockup: add set_config to support pull up/down gpiolib: pull requires explicit input mode gpiolib: disable bias on inputs when pull up/down are both set gpiolib: allow pull up/down on outputs drivers/gpio/gpio-mockup.c | 94 ++++++++++++++++++++++++-------------- drivers/gpio/gpiolib.c | 55 ++++++++++++++++------ 2 files changed, 100 insertions(+), 49 deletions(-) -- 2.23.0