[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VfDZXzRQjTZSYO6tb3k6WDWmPz1Fpw8Y_RBx8cz79j2=Q@mail.gmail.com>
Date: Mon, 5 Sep 2022 13:54:00 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Pali Rohár <pali@...nel.org>
Cc: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Thierry Reding <thierry.reding@...il.com>,
Mark Brown <broonie@...nel.org>,
Matti Vaittinen <mazziesaccount@...il.com>,
Lorenzo Pieralisi <lpieralisi@...nel.org>,
Claudiu Beznea <claudiu.beznea@...rochip.com>,
Liam Girdwood <lgirdwood@...il.com>,
Wim Van Sebroeck <wim@...ux-watchdog.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Guenter Roeck <linux@...ck-us.net>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Linus Walleij <linus.walleij@...aro.org>,
Felipe Balbi <balbi@...nel.org>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Krzysztof Wilczyński <kw@...ux.com>,
Vignesh Raghavendra <vigneshr@...com>,
Daniel Vetter <daniel@...ll.ch>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Marc Zyngier <maz@...nel.org>,
Richard Weinberger <richard@....at>,
David Airlie <airlied@...ux.ie>,
Nicolas Ferre <nicolas.ferre@...rochip.com>,
Alyssa Rosenzweig <alyssa@...enzweig.io>,
Bartosz Golaszewski <brgl@...ev.pl>,
Jonathan Hunter <jonathanh@...dia.com>,
Rob Herring <robh@...nel.org>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
LINUXWATCHDOG <linux-watchdog@...r.kernel.org>,
USB <linux-usb@...r.kernel.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
linux-pci <linux-pci@...r.kernel.org>,
linux-tegra <linux-tegra@...r.kernel.org>,
"open list:MEMORY TECHNOLOGY..." <linux-mtd@...ts.infradead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
dri-devel <dri-devel@...ts.freedesktop.org>,
linux-stm32@...md-mailman.stormreply.com,
linux-arm Mailing List <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v1 01/11] PCI: tegra: switch to using devm_fwnode_gpiod_get
On Mon, Sep 5, 2022 at 1:49 PM Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
>
> On Mon, Sep 5, 2022 at 10:23 AM Pali Rohár <pali@...nel.org> wrote:
> > On Sunday 04 September 2022 23:30:53 Dmitry Torokhov wrote:
>
> ...
>
> > > - rp->reset_gpio = devm_gpiod_get_from_of_node(dev, port,
> > > - "reset-gpios", 0,
> > > - GPIOD_OUT_LOW,
> > > - label);
> > > + rp->reset_gpio = devm_fwnode_gpiod_get(dev,
> > > + of_fwnode_handle(port),
> > > + "reset",
> > > + GPIOD_OUT_LOW,
> > > + label);
> >
> > Why in pci-aardvark.c for PERST# reset-gpio you have used
> > devm_gpiod_get_optional() and here in pci-tegra.c you have used
> > devm_fwnode_gpiod_get()? I think that PERST# logic is same in both
> > drivers.
>
> It's not the same dev and its node in this case. There is one reset
> for _all_ ports, here is the reset on _per port_ basis.
Actually I'm wrong, the aardvark has only one port (?) to serve there.
In any case, here dev == dev->of_node, here dev != port.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists