From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
To: Ed Wildgoose <lists@wildgooses.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
fe@dev.tdt.de, "Enrico Weigelt,
metux IT consult" <info@metux.net>,
Linus Walleij <linus.walleij@linaro.org>,
linux-gpio <linux-gpio@vger.kernel.org>
Subject: Re: [PATCH] gpio: gpio-amd-fch: Correct logic of GPIO_LINE_DIRECTION
Date: Thu, 24 Sep 2020 15:29:27 +0200 [thread overview]
Message-ID: <CAMpxmJV0jwLAn3Xee_3zDiF_DQF-8uy52qxU1WAbr9xiVb0WLQ@mail.gmail.com> (raw)
In-Reply-To: <20200920203430.25829-1-lists@wildgooses.com>
On Sun, Sep 20, 2020 at 10:34 PM Ed Wildgoose <lists@wildgooses.com> wrote:
>
> 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 <lists@wildgooses.com>
> ---
> drivers/gpio/gpio-amd-fch.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpio-amd-fch.c b/drivers/gpio/gpio-amd-fch.c
> index 4e44ba4d7..2a21354ed 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,
> --
> 2.26.2
>
Can you add a Fixes tag with the original commit?
Bartosz
next prev parent reply other threads:[~2020-09-24 13:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-20 20:34 [PATCH] gpio: gpio-amd-fch: Correct logic of GPIO_LINE_DIRECTION Ed Wildgoose
2020-09-24 13:29 ` Bartosz Golaszewski [this message]
2020-09-28 9:44 ` Ed Wildgoose
2020-09-28 10:23 ` Bartosz Golaszewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMpxmJV0jwLAn3Xee_3zDiF_DQF-8uy52qxU1WAbr9xiVb0WLQ@mail.gmail.com \
--to=bgolaszewski@baylibre.com \
--cc=fe@dev.tdt.de \
--cc=info@metux.net \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lists@wildgooses.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).