Skip to content
Commit ae9847f4 authored by Ricardo Ribalda Delgado's avatar Ricardo Ribalda Delgado Committed by Linus Walleij
Browse files

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: default avatarRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 32d064a1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment