FAILED: patch "[PATCH] gpio: amd-fch: correct logic of GPIO_LINE_DIRECTION" failed to apply to 5.4-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From d25e8fdebdad84219b498873300b7f11dd915b88 Mon Sep 17 00:00:00 2001
From: Ed Wildgoose <[email protected]>
Date: Mon, 28 Sep 2020 10:44:52 +0100
Subject: [PATCH] gpio: amd-fch: correct logic of GPIO_LINE_DIRECTION
The original commit appears to have the logic reversed in amd_fch_gpio_get_direction. Also confirmed by observing the value of "direction" in the sys tree.
Signed-off-by Ed Wildgoose <[email protected]>
Fixes e09d168f13f0 ("gpio: AMD G-Series PCH gpio driver")
Signed-off-by Bartosz Golaszewski <[email protected]>
drivers/gpio/gpio-amd-fch.c +1 -1
@@ -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,