]> 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)
commit565df8a6ceea61a24feceab950d15d7cb7ec4896
tree4f8252982415c3f29a36e739f453b7c030eda878
parent7209d892799389098d0257c25fadb816d17fa46c
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