[PATCH v5 2/3] phy: qcom: qmp-pcie: Add QMP PCIe Multi-PHY driver

Qiang Yu qiang.yu at oss.qualcomm.com
Sun Jul 19 20:36:49 PDT 2026


On Fri, Jul 17, 2026 at 05:45:45PM -0500, Bjorn Andersson wrote:
> On Fri, Jul 17, 2026 at 02:58:34AM -0700, Qiang Yu wrote:
> [..]
> > diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-multiphy.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-multiphy.c
> > new file mode 100644
> > index 000000000000..b79edf2b7d5f
> > --- /dev/null
> > +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-multiphy.c
> > @@ -0,0 +1,770 @@
> > +// SPDX-License-Identifier: GPL-2.0-only
> > +/*
> > + * Copyright (c) 2026, Qualcomm Technologies, Inc. and/or its subsidiaries.
> 
> No, there should not be a year in there.

Ack, will drop the year:

Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.

> 
> > + */
> > +
> [..]
> > +static int qmp_pcie_pd_power_on(struct qmp_pcie *qmp)
> > +{
> > +	const struct qmp_phy_cfg *cfg = qmp->cfg;
> > +	int i, ret;
> > +
> > +	for (i = 0; i < cfg->num_pds; i++) {
> > +		ret = pm_runtime_get_sync(qmp->pd_devs[i]);
> 
> In the error path you will put pd_devs[0..i-1], but
> pm_runtime_get_sync() requires that you put pd_devs[i] as well.
> 
> Please use pm_runtime_resume_and_get() instead.

Okay, will switch to pm_runtime_resume_and_get() to avoid this imbalance.

- Qiang Yu
> 
> > +		if (ret < 0) {
> > +			dev_err(qmp->dev, "failed to power on %s domain\n",
> > +				cfg->pd_names[i]);
> > +			goto err_power_off;
> > +		}
> > +	}
> > +
> > +	return 0;
> > +
> > +err_power_off:
> > +	while (--i >= 0)
> > +		pm_runtime_put(qmp->pd_devs[i]);
> > +
> > +	return ret;
> > +}
> 
> Regards,
> Bjorn



More information about the linux-phy mailing list