commit | 25b35da7f4cce82271859f1b6eabd9f3bd41a2bb | [log] [tgz] |
---|---|---|
author | Linus Walleij <linus.walleij@linaro.org> | Wed Feb 05 14:08:02 2014 +0100 |
committer | Linus Walleij <linus.walleij@linaro.org> | Thu Feb 06 10:33:48 2014 +0100 |
tree | 4ac95fc298a149ec24c8517bbf04db27d1c9aa6e | |
parent | f86b7c70bc03236188c9a865aacd57b8d1ddb08c [diff] |
gpio: generic: clamp retured value to [0,1] The generic GPIO would return 0 for low generic GPIO, and something != 0 for high GPIO. Let's make this sane by clamping the returned value to [0,1]. Reported-by: Evgeny Boger <boger@contactless.ru> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>