Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Martin Schiller <ms@dev.tdt.de>
Cc: hauke@hauke-m.de, dmitry.torokhov@gmail.com,
	rdunlap@infradead.org, robh@kernel.org, bhelgaas@google.com,
	linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] MIPS: pci: lantiq: restore reset gpio polarity
Date: Tue, 11 Jun 2024 16:12:18 +0200	[thread overview]
Message-ID: <ZmhbQgXxyhZ7shBh@alpha.franken.de> (raw)
In-Reply-To: <20240607090400.1816612-1-ms@dev.tdt.de>

On Fri, Jun 07, 2024 at 11:04:00AM +0200, Martin Schiller wrote:
> Commit 90c2d2eb7ab5 ("MIPS: pci: lantiq: switch to using gpiod API") not
> only switched to the gpiod API, but also inverted / changed the polarity
> of the GPIO.
> 
> According to the PCI specification, the RST# pin is an active-low
> signal. However, most of the device trees that have been widely used for
> a long time (mainly in the openWrt project) define this GPIO as
> active-high and the old driver code inverted the signal internally.
> 
> Apparently there are actually boards where the reset gpio must be
> operated inverted. For this reason, we cannot use the GPIOD_OUT_LOW/HIGH
> flag for initialization. Instead, we must explicitly set the gpio to
> value 1 in order to take into account any "GPIO_ACTIVE_LOW" flag that
> may have been set.
> 
> In order to remain compatible with all these existing device trees, we
> should therefore keep the logic as it was before the commit.
> 
> Fixes: 90c2d2eb7ab5 ("MIPS: pci: lantiq: switch to using gpiod API")
> Cc: stable@vger.kernel.org
> Signed-off-by: Martin Schiller <ms@dev.tdt.de>
> ---
>  arch/mips/pci/pci-lantiq.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

applied to mips-fixes

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

  reply	other threads:[~2024-06-11 14:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-07  9:04 [PATCH] MIPS: pci: lantiq: restore reset gpio polarity Martin Schiller
2024-06-11 14:12 ` Thomas Bogendoerfer [this message]
2024-06-12 15:38   ` Dmitry Torokhov
2024-06-12 17:47 ` Dmitry Torokhov
2024-06-12 18:39   ` Martin Schiller
2024-06-12 19:47     ` Martin Schiller
2024-06-12 21:45       ` Dmitry Torokhov
2024-06-12 23:32         ` Dmitry Torokhov
2024-06-13  6:01           ` Martin Schiller
2024-06-13  6:29             ` Dmitry Torokhov
2024-06-13 20:06       ` Hauke Mehrtens
2024-06-14  8:43         ` Martin Schiller
2024-06-20  0:54           ` Dmitry Torokhov
2024-06-24  8:16             ` Martin Schiller
2024-06-13  8:10     ` Thomas Bogendoerfer

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=ZmhbQgXxyhZ7shBh@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=bhelgaas@google.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hauke@hauke-m.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=ms@dev.tdt.de \
    --cc=rdunlap@infradead.org \
    --cc=robh@kernel.org \
    --cc=stable@vger.kernel.org \
    /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