commit | ae9847f48a4b4bff0335da20be63ac84d94eb54c | [log] [tgz] |
---|---|---|
author | Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> | Fri Sep 21 12:36:03 2018 +0200 |
committer | Linus Walleij <linus.walleij@linaro.org> | Tue Sep 25 09:34:48 2018 +0200 |
tree | ad76987a49c41717745779be2be1b3eb9ae34870 | |
parent | 32d064a16eaace1866610f36fb5f4b114d979246 [diff] |
gpiolib: Fix gpio_direction_* for single direction GPIOs GPIOs with no programmable direction are not required to implement direction_output nor direction_input. If we try to set an output direction on an output-only GPIO or input direction on an input-only GPIO simply return 0. This allows this single direction GPIO to be used by libgpiod. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>