[PATCH v3 1/2] phy: qcom: qmp-usb: Add PM suspend/resume callbacks

From: Prashanth K

Date: Wed Dec 02 2026 - 05:09:21 EST


Currently when we perform system suspend, the phy clocks aren't
turned off, this leads to power leakage. Prevent this by adding
PM suspend/resume callbacks for the qmp-usb phy which toggles
clocks on/off correspondingly.

Signed-off-by: Prashanth K <prashanth.k@xxxxxxxxxxxxxxxx>
---
drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
index 6348bb68d822..9e056956100b 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
@@ -2126,10 +2126,9 @@ static int __maybe_unused qmp_usb_runtime_resume(struct device *dev)
return 0;
}

-static const struct dev_pm_ops qmp_usb_pm_ops = {
- SET_RUNTIME_PM_OPS(qmp_usb_runtime_suspend,
- qmp_usb_runtime_resume, NULL)
-};
+static DEFINE_RUNTIME_DEV_PM_OPS(qmp_usb_pm_ops,
+ qmp_usb_runtime_suspend,
+ qmp_usb_runtime_resume, NULL);

static int qmp_usb_reset_init(struct qmp_usb *qmp,
const char *const *reset_list,
@@ -2509,7 +2508,7 @@ static struct platform_driver qmp_usb_driver = {
.probe = qmp_usb_probe,
.driver = {
.name = "qcom-qmp-usb-phy",
- .pm = &qmp_usb_pm_ops,
+ .pm = pm_ptr(&qmp_usb_pm_ops),
.of_match_table = qmp_usb_of_match_table,
},
};
--
2.34.1