[PATCH v4 5/7] PCI: mediatek-gen3: Split out device power helpers

Bjorn Helgaas helgaas at kernel.org
Tue Mar 10 16:42:39 PDT 2026


On Tue, Mar 10, 2026 at 05:19:44PM +0800, Chen-Yu Tsai wrote:
> In preparation for adding full power on/off control with the pwrctrl
> API, split out the existing code that only partially deals with device
> power sequencing into separate helper functions. The existing code only
> handles PERST#.

> +static int mtk_pcie_device_power_up(struct mtk_gen3_pcie *pcie)

This function name suggests that there's only a single downstream
device, which obviously is not always the case.  When you later call
pci_pwrctrl_power_on_devices() here, apparently that powers on the
entire hierarchy.  Maybe this mtk_* name should be similar to make a
connection there?

> +static void mtk_pcie_device_power_down(struct mtk_gen3_pcie *pcie)

Same applies here, of course.



More information about the Linux-mediatek mailing list