Axel Lin c5bc6e526d gpio: adnp: Fix testing wrong value in adnp_gpio_direction_input
Current code test wrong value so it does not verify if the written
data is correctly read back. Fix it.
Also make it return -EPERM if read value does not match written bit,
just like it done for adnp_gpio_direction_output().

Fixes: 5e969a401a01 ("gpio: Add Avionic Design N-bit GPIO expander support")
Cc: <stable@vger.kernel.org>
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2019-03-22 16:48:47 +01:00
..
2018-12-21 11:41:00 +01:00
2018-03-19 01:50:07 +01:00
2019-02-17 21:59:33 +01:00
2018-05-16 14:35:24 +02:00
2018-08-10 23:19:17 +02:00
2018-12-14 14:27:41 +01:00
2019-02-14 15:14:37 +01:00
2019-02-17 21:59:33 +01:00
2017-12-22 15:24:31 +01:00
2018-08-29 08:53:37 +02:00
2018-01-09 14:51:00 +01:00
2018-09-17 10:55:24 -07:00
2019-02-17 21:59:33 +01:00
2019-02-22 17:26:52 +01:00
2019-02-22 17:26:52 +01:00
2018-11-05 08:54:40 +01:00