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

Manivannan Sadhasivam mani at kernel.org
Tue Mar 24 03:55:21 PDT 2026


On Tue, Mar 24, 2026 at 04:55:47PM +0800, Chen-Yu Tsai wrote:
> On Tue, Mar 24, 2026 at 1:20 PM Chen-Yu Tsai <wenst at chromium.org> 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#.
> >
> > This is purely moving code around, and brings no functional changes.
> >
> > Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
> > Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski at oss.qualcomm.com>
> > Reviewed-by: Manivannan Sadhasivam <mani at kernel.org>
> > Signed-off-by: Chen-Yu Tsai <wenst at chromium.org>
> > ---
> >  drivers/pci/controller/pcie-mediatek-gen3.c | 87 ++++++++++++---------
> >  1 file changed, 52 insertions(+), 35 deletions(-)
> >
> > diff --git a/drivers/pci/controller/pcie-mediatek-gen3.c b/drivers/pci/controller/pcie-mediatek-gen3.c
> > index 22a16e4ebc76..526db8815401 100644
> > --- a/drivers/pci/controller/pcie-mediatek-gen3.c
> > +++ b/drivers/pci/controller/pcie-mediatek-gen3.c
> > @@ -403,6 +403,54 @@ static void mtk_pcie_enable_msi(struct mtk_gen3_pcie *pcie)
> >         writel_relaxed(val, pcie->base + PCIE_INT_ENABLE_REG);
> >  }
> >
> > +static int mtk_pcie_devices_power_up(struct mtk_gen3_pcie *pcie)
> > +{
> > +       int err;
> 
> Sashiko pointed out that this addition would cause an unused variable
> warning. This line should be added in the last patch instead.
> 
> Do you want me to respin? Or is it fine since the end result is the same?
> 

I fixed it in the branch as we try not to introduce any warning even between the
commits.

> Sorry about this.
> 

Np!

- Mani

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



More information about the Linux-mediatek mailing list