summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-rcar.c
diff options
context:
space:
mode:
authorBartosz Golaszewski <bgolaszewski@baylibre.com>2019-11-12 10:34:00 +0100
committerBartosz Golaszewski <bgolaszewski@baylibre.com>2019-11-12 10:34:00 +0100
commit5be85ec0de8425fb22c7b38fbaf4f245e41a5dca (patch)
tree4148d2f8aa56b75488fbd568048ac81fa786ae9a /drivers/gpio/gpio-rcar.c
parent1720624ee47369d6221dde477a883ddf57379531 (diff)
parent6b240aeb121ec14a528a58413baa9a74f8749604 (diff)
Merge remote-tracking branch 'linusw/for-next' into gpio/for-next
Diffstat (limited to 'drivers/gpio/gpio-rcar.c')
-rw-r--r--drivers/gpio/gpio-rcar.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
index 187984d26f47..d7e6e68c25af 100644
--- a/drivers/gpio/gpio-rcar.c
+++ b/drivers/gpio/gpio-rcar.c
@@ -279,7 +279,10 @@ static int gpio_rcar_get_direction(struct gpio_chip *chip, unsigned int offset)
{
struct gpio_rcar_priv *p = gpiochip_get_data(chip);
- return !(gpio_rcar_read(p, INOUTSEL) & BIT(offset));
+ if (gpio_rcar_read(p, INOUTSEL) & BIT(offset))
+ return GPIO_LINE_DIRECTION_OUT;
+
+ return GPIO_LINE_DIRECTION_IN;
}
static int gpio_rcar_direction_input(struct gpio_chip *chip, unsigned offset)