gpio: selftests: gpio-mockup-chardev GPIOHANDLE_REQUEST_OUTPUT fix
authorRafael David Tinoco <rafael.tinoco@linaro.org>
Wed, 6 Jun 2018 17:44:24 +0000 (14:44 -0300)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 9 Jul 2018 14:08:17 +0000 (16:08 +0200)
commit76411a0d97c3b216ce1c987aa4afa7f3789c89d9
treedcc9062ce1aece924fb7fc61fc602d5afcd4ca16
parent8853daf3b4acb3bf8c0244a12b4f58ed5123f449
gpio: selftests: gpio-mockup-chardev GPIOHANDLE_REQUEST_OUTPUT fix

Following logic from commit: 22f6592b23, GPIOHANDLE_REQUEST_OUTPUT
should handle errors same way as GPIOHANDLE_REQUEST_INPUT does, or else
the following error occurs:

gpio-mockup-chardev: gpio<gpiochip1> line<0> test flag<0x2> value<0>: No
such file or directory

despite the real result of gpio_pin_test(), gpio_debugfs_get() and
gpiotools_request_linehandle() functions.

Signed-off-by: Rafael David Tinoco <rafael.tinoco@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
tools/testing/selftests/gpio/gpio-mockup-chardev.c