]> git.baikalelectronics.ru Git - kernel.git/commit
gpiolib: don't allow OPEN_DRAIN & OPEN_SOURCE flags for input
authorBartosz Golaszewski <brgl@bgdev.pl>
Mon, 16 Oct 2017 09:32:30 +0000 (11:32 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 19 Oct 2017 20:32:39 +0000 (22:32 +0200)
commit7f4bbdb87a9823ad667b20584e597cc542c30802
treeb38145be5ed4aded0a31de14de36e1bc0e8802e1
parent13b0f5075d50037b9f88b041cd3327ff38b8b9c1
gpiolib: don't allow OPEN_DRAIN & OPEN_SOURCE flags for input

OPEN_DRAIN and OPEN_SOURCE flags only affect the way we drive a GPIO
line, so they only make sense for output mode. Just as we only allow
input mode for event handle requests, don't allow passing open-drain
and open-source flags for any other mode than explicit output.

Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c