summaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2020-09-30 11:38:04 +0200
committerLinus Walleij <linus.walleij@linaro.org>2020-09-30 11:38:04 +0200
commit17479aa39fbf65ad1502368437875e537c2f8139 (patch)
treea727af5e738dc8ec16b54ed41d172f97bfdcd697 /drivers/gpio
parent2e969d8a7f9903e8d015885bdfd031a6809a4d02 (diff)
parentd25e8fdebdad84219b498873300b7f11dd915b88 (diff)
downloadlinux-17479aa39fbf65ad1502368437875e537c2f8139.tar.bz2
Merge tag 'gpio-fixes-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into fixes
gpio fixes for v5.9 - correct logic of GPIO_LINE_DIRECTION in gpio-amd-fch
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-amd-fch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-amd-fch.c b/drivers/gpio/gpio-amd-fch.c
index 4e44ba4d7423..2a21354ed6a0 100644
--- a/drivers/gpio/gpio-amd-fch.c
+++ b/drivers/gpio/gpio-amd-fch.c
@@ -92,7 +92,7 @@ static int amd_fch_gpio_get_direction(struct gpio_chip *gc, unsigned int gpio)
ret = (readl_relaxed(ptr) & AMD_FCH_GPIO_FLAG_DIRECTION);
spin_unlock_irqrestore(&priv->lock, flags);
- return ret ? GPIO_LINE_DIRECTION_IN : GPIO_LINE_DIRECTION_OUT;
+ return ret ? GPIO_LINE_DIRECTION_OUT : GPIO_LINE_DIRECTION_IN;
}
static void amd_fch_gpio_set(struct gpio_chip *gc,