gpio: clamp values on gpio[d]_direction_output()
authorLinus Walleij <linus.walleij@linaro.org>
Sun, 13 Nov 2016 22:02:44 +0000 (23:02 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 15 Nov 2016 09:29:41 +0000 (10:29 +0100)
commitad17731d7bd1c379f83d4bde844169588441266f
tree6e3316e335bca66714dbf3a092ddbaa5e7a8f756
parent24b35ed9a84ab1e7ad96c67434841120ca7fbf36
gpio: clamp values on gpio[d]_direction_output()

I saw weird values != [0,1] being passed down to drivers
in their .set_direction_output() callbacks. Go over the
gpiolib and make sure to hammer it to [0,1] before hitting
the driver to avoid undesired side effects.

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