Re: [PATCH V13 02/12] PCI: host-generic: Add common helpers for parsing Root Port properties

From: mani@xxxxxxxxxx

Date: Mon Apr 20 2026 - 05:35:52 EST


On Mon, Apr 20, 2026 at 08:24:57AM +0000, Sherry Sun wrote:

[...]

> > Even if there are PERST# GPIOs from the host, connected to downstream
> > ports of a PCIe switch, they could be stored in the Root Port's (pci_host_port)
> > struct as a list of PERST#. This is what pcie-qcom driver does.
> >
> > It is too clumsy to handle PERST# individually for each device. We tried it
> > before with pwrctrl, but it always ended up biting us on who gets to control
> > the PERST#. We can't let pwrctrl handle PERST# for a switch port and host
> > controller driver handle it for RP. And we cannot let pwrctrl handle PERST# for
> > all ports, because, host controller drivers also need to control them for RC
> > initialization.
> >
> > That's why it was decided to handle PERST# for all ports in the host controller
> > drivers. So following that pattern, this helper could also be extended to parse
> > the PERST# from all ports defined in DT and store them in the same Root Port
> > struct.
> >
> > It should be trivial to implement this logic in the current helper. @Sherry:
> > Could you please implement this logic?
>
> Hi Mani, do you mean the similar logic in this patch?
> https://lore.kernel.org/all/20251216-pci-pwrctrl-rework-v2-1-745a563b9be6@xxxxxxxxxxxxxxxx/
> If yes, of cause I can do this for current helper functions in pci-host-common.c.
>

Yes!

- Mani

--
மணிவண்ணன் சதாசிவம்