Re: [PATCH v1 01/11] PCI: tegra: switch to using devm_fwnode_gpiod_get

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 5, 2022 at 1:49 PM Andy Shevchenko
<andy.shevchenko@xxxxxxxxx> wrote:
>
> On Mon, Sep 5, 2022 at 10:23 AM Pali Rohár <pali@xxxxxxxxxx> 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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux