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

From: Prashanth K

Date: Thu Oct 22 2026 - 06:47:16 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 | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
index b0790bcf0bc8..d2863633007d 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
@@ -2150,9 +2150,26 @@ static int __maybe_unused qmp_usb_runtime_resume(struct device *dev)
return 0;
}

+static int __maybe_unused qmp_usb_pm_suspend(struct device *dev)
+{
+ if (pm_runtime_suspended(dev))
+ return 0;
+
+ return qmp_usb_runtime_suspend(dev);
+}
+
+static int __maybe_unused qmp_usb_pm_resume(struct device *dev)
+{
+ if (pm_runtime_suspended(dev))
+ return 0;
+
+ return qmp_usb_runtime_resume(dev);
+}
+
static const struct dev_pm_ops qmp_usb_pm_ops = {
SET_RUNTIME_PM_OPS(qmp_usb_runtime_suspend,
qmp_usb_runtime_resume, NULL)
+ SET_SYSTEM_SLEEP_PM_OPS(qmp_usb_pm_suspend, qmp_usb_pm_resume)
};

static int qmp_usb_reset_init(struct qmp_usb *qmp,
--
2.34.1