]> git.baikalelectronics.ru Git - kernel.git/commit
gpiolib: Split GPIO flags parsing and GPIO configuration
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Mon, 12 Oct 2015 21:20:20 +0000 (00:20 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 16 Oct 2015 20:46:46 +0000 (22:46 +0200)
commit9c934fc75aa81c6b7f3fbe0898f08abdcab8cf46
tree4f8252982415c3f29a36e739f453b7c030eda878
parent124591e049aa3ec4c23e89f9da7e40b32e202807
gpiolib: Split GPIO flags parsing and GPIO configuration

When requesting a GPIO through the legacy or the gpiod_* API the
gpiochip request operation is first called and then the GPIO flags are
parsed and the GPIO is configured. This prevents the gpiochip from
rejecting the request if the flags are not supported by the device.

To fix this split the parse-and-configure operation in two and parse
flags before requesting the GPIO.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib-legacy.c
drivers/gpio/gpiolib.c