* [PATCH v2 0/2] pinctrl: qcom: lpass-lpi: Force runtime suspend on system sleep
@ 2026-11-18 13:37 Gopi Chandra Sekhar Reddy Kanala
2026-11-18 13:37 ` [PATCH v2 1/2] pinctrl: qcom: lpass-lpi: Move dev_pm_ops to the common driver Gopi Chandra Sekhar Reddy Kanala
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Gopi Chandra Sekhar Reddy Kanala @ 2026-11-18 13:37 UTC (permalink / raw)
To: Bjorn Andersson, Bartosz Golaszewski, Linus Walleij
Cc: Srinivas Kandagatla, Konrad Dybcio, linux-arm-msm, linux-gpio,
linux-kernel, Gopi Chandra Sekhar Reddy Kanala
The LPASS LPI pin controllers only have runtime PM callbacks, so their
clock votes stay held across system suspend when a consumer, such as a
SoundWire controller, is active when suspend starts. On Glymur CRD this
keeps CX and DDR from collapsing in s2idle.
Patch 1 moves the dev_pm_ops, which are the same in every SoC-specific
driver, into the common driver. Patch 2 adds pm_runtime_force_suspend()
and pm_runtime_force_resume() as the system sleep callbacks there, so
the fix covers all the SoC-specific drivers.
Tested on Glymur CRD (pinctrl-sm8650-lpass-lpi) with next-20261113.
When s2idle is entered right after playback, the LPI clock votes are
now released during suspend and restored on resume. Playback works
after resume. The other SoC-specific drivers are compile-tested only.
---
Changes in v2:
- Move the dev_pm_ops into the common driver and apply the fix to all
LPASS LPI drivers, not only sm8650 (Konrad, Bartosz)
- Link to v1: https://lore.kernel.org/r/20261112-lpass-lpi-system-sleep-v1-1-438cb997e0e9@oss.qualcomm.com
---
Gopi Chandra Sekhar Reddy Kanala (2):
pinctrl: qcom: lpass-lpi: Move dev_pm_ops to the common driver
pinctrl: qcom: lpass-lpi: Force runtime suspend on system sleep
drivers/pinctrl/qcom/pinctrl-hawi-lpass-lpi.c | 6 ------
drivers/pinctrl/qcom/pinctrl-lpass-lpi.c | 5 +++++
drivers/pinctrl/qcom/pinctrl-lpass-lpi.h | 3 +++
drivers/pinctrl/qcom/pinctrl-milos-lpass-lpi.c | 6 ------
drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c | 6 ------
drivers/pinctrl/qcom/pinctrl-sc8280xp-lpass-lpi.c | 6 ------
drivers/pinctrl/qcom/pinctrl-sdm660-lpass-lpi.c | 6 ------
drivers/pinctrl/qcom/pinctrl-sdm670-lpass-lpi.c | 6 ------
drivers/pinctrl/qcom/pinctrl-sm4250-lpass-lpi.c | 6 ------
drivers/pinctrl/qcom/pinctrl-sm6115-lpass-lpi.c | 6 ------
drivers/pinctrl/qcom/pinctrl-sm6350-lpass-lpi.c | 6 ------
drivers/pinctrl/qcom/pinctrl-sm8250-lpass-lpi.c | 6 ------
drivers/pinctrl/qcom/pinctrl-sm8450-lpass-lpi.c | 6 ------
drivers/pinctrl/qcom/pinctrl-sm8550-lpass-lpi.c | 6 ------
drivers/pinctrl/qcom/pinctrl-sm8650-lpass-lpi.c | 6 ------
15 files changed, 8 insertions(+), 78 deletions(-)
---
base-commit: 84abb955b1015477aa11a96e2f3ac1b938b77f48
change-id: 20261112-lpass-lpi-system-sleep-70c4d2239abe
Best regards,
--
Gopi Chandra Sekhar Reddy Kanala <gopi.kanala@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/2] pinctrl: qcom: lpass-lpi: Move dev_pm_ops to the common driver
2026-11-18 13:37 [PATCH v2 0/2] pinctrl: qcom: lpass-lpi: Force runtime suspend on system sleep Gopi Chandra Sekhar Reddy Kanala
@ 2026-11-18 13:37 ` Gopi Chandra Sekhar Reddy Kanala
2026-11-23 14:37 ` Bartosz Golaszewski
2026-11-18 13:37 ` [PATCH v2 2/2] pinctrl: qcom: lpass-lpi: Force runtime suspend on system sleep Gopi Chandra Sekhar Reddy Kanala
2026-11-23 14:48 ` [PATCH v2 0/2] " Bartosz Golaszewski
2 siblings, 1 reply; 5+ messages in thread
From: Gopi Chandra Sekhar Reddy Kanala @ 2026-11-18 13:37 UTC (permalink / raw)
To: Bjorn Andersson, Bartosz Golaszewski, Linus Walleij
Cc: Srinivas Kandagatla, Konrad Dybcio, linux-arm-msm, linux-gpio,
linux-kernel, Gopi Chandra Sekhar Reddy Kanala
All the SoC-specific LPASS LPI drivers probe through the common
lpi_pinctrl_probe(), which sets up pm_clk and runtime PM, and each of
them defines the same dev_pm_ops with only the pm_clk runtime callbacks.
Define the dev_pm_ops once in the common driver, next to the code that
sets up pm_clk and runtime PM, and export it for the SoC-specific
drivers, so the PM callbacks only need to be changed in one place. Drop
the pm_clock.h and pm_runtime.h includes from the SoC-specific drivers,
as nothing there uses them anymore.
No functional change.
Signed-off-by: Gopi Chandra Sekhar Reddy Kanala <gopi.kanala@oss.qualcomm.com>
---
drivers/pinctrl/qcom/pinctrl-hawi-lpass-lpi.c | 6 ------
drivers/pinctrl/qcom/pinctrl-lpass-lpi.c | 4 ++++
drivers/pinctrl/qcom/pinctrl-lpass-lpi.h | 3 +++
drivers/pinctrl/qcom/pinctrl-milos-lpass-lpi.c | 6 ------
drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c | 6 ------
drivers/pinctrl/qcom/pinctrl-sc8280xp-lpass-lpi.c | 6 ------
drivers/pinctrl/qcom/pinctrl-sdm660-lpass-lpi.c | 6 ------
drivers/pinctrl/qcom/pinctrl-sdm670-lpass-lpi.c | 6 ------
drivers/pinctrl/qcom/pinctrl-sm4250-lpass-lpi.c | 6 ------
drivers/pinctrl/qcom/pinctrl-sm6115-lpass-lpi.c | 6 ------
drivers/pinctrl/qcom/pinctrl-sm6350-lpass-lpi.c | 6 ------
drivers/pinctrl/qcom/pinctrl-sm8250-lpass-lpi.c | 6 ------
drivers/pinctrl/qcom/pinctrl-sm8450-lpass-lpi.c | 6 ------
drivers/pinctrl/qcom/pinctrl-sm8550-lpass-lpi.c | 6 ------
drivers/pinctrl/qcom/pinctrl-sm8650-lpass-lpi.c | 6 ------
15 files changed, 7 insertions(+), 78 deletions(-)
diff --git a/drivers/pinctrl/qcom/pinctrl-hawi-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-hawi-lpass-lpi.c
index 7036bf4c6692..de7f28129012 100644
--- a/drivers/pinctrl/qcom/pinctrl-hawi-lpass-lpi.c
+++ b/drivers/pinctrl/qcom/pinctrl-hawi-lpass-lpi.c
@@ -6,8 +6,6 @@
#include <linux/gpio/driver.h>
#include <linux/module.h>
#include <linux/platform_device.h>
-#include <linux/pm_clock.h>
-#include <linux/pm_runtime.h>
#include "pinctrl-lpass-lpi.h"
@@ -225,10 +223,6 @@ static const struct of_device_id lpi_pinctrl_of_match[] = {
};
MODULE_DEVICE_TABLE(of, lpi_pinctrl_of_match);
-static const struct dev_pm_ops lpi_pinctrl_pm_ops = {
- RUNTIME_PM_OPS(pm_clk_suspend, pm_clk_resume, NULL)
-};
-
static struct platform_driver lpi_pinctrl_driver = {
.driver = {
.name = "qcom-hawi-lpass-lpi-pinctrl",
diff --git a/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c
index 02f678fa75b1..1f1635ec53d7 100644
--- a/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c
+++ b/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c
@@ -611,5 +611,9 @@ void lpi_pinctrl_remove(struct platform_device *pdev)
}
EXPORT_SYMBOL_GPL(lpi_pinctrl_remove);
+EXPORT_GPL_DEV_PM_OPS(lpi_pinctrl_pm_ops) = {
+ RUNTIME_PM_OPS(pm_clk_suspend, pm_clk_resume, NULL)
+};
+
MODULE_DESCRIPTION("QTI LPI GPIO pin control driver");
MODULE_LICENSE("GPL");
diff --git a/drivers/pinctrl/qcom/pinctrl-lpass-lpi.h b/drivers/pinctrl/qcom/pinctrl-lpass-lpi.h
index 056c4a774389..fc6aa5f552e6 100644
--- a/drivers/pinctrl/qcom/pinctrl-lpass-lpi.h
+++ b/drivers/pinctrl/qcom/pinctrl-lpass-lpi.h
@@ -11,6 +11,7 @@
#include "../core.h"
+struct dev_pm_ops;
struct platform_device;
struct pinctrl_pin_desc;
@@ -145,4 +146,6 @@ struct lpi_pinctrl_variant_data {
int lpi_pinctrl_probe(struct platform_device *pdev);
void lpi_pinctrl_remove(struct platform_device *pdev);
+extern const struct dev_pm_ops lpi_pinctrl_pm_ops;
+
#endif /*__PINCTRL_LPASS_LPI_H__*/
diff --git a/drivers/pinctrl/qcom/pinctrl-milos-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-milos-lpass-lpi.c
index cb4934cd6f75..2a9f8d1c6cf3 100644
--- a/drivers/pinctrl/qcom/pinctrl-milos-lpass-lpi.c
+++ b/drivers/pinctrl/qcom/pinctrl-milos-lpass-lpi.c
@@ -7,8 +7,6 @@
#include <linux/gpio/driver.h>
#include <linux/module.h>
#include <linux/platform_device.h>
-#include <linux/pm_clock.h>
-#include <linux/pm_runtime.h>
#include "pinctrl-lpass-lpi.h"
@@ -245,10 +243,6 @@ static const struct of_device_id lpi_pinctrl_of_match[] = {
};
MODULE_DEVICE_TABLE(of, lpi_pinctrl_of_match);
-static const struct dev_pm_ops lpi_pinctrl_pm_ops = {
- RUNTIME_PM_OPS(pm_clk_suspend, pm_clk_resume, NULL)
-};
-
static struct platform_driver lpi_pinctrl_driver = {
.driver = {
.name = "qcom-milos-lpass-lpi-pinctrl",
diff --git a/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c
index a61df10d46cb..fd448b6dbb6d 100644
--- a/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c
+++ b/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c
@@ -7,8 +7,6 @@
#include <linux/gpio/driver.h>
#include <linux/module.h>
#include <linux/platform_device.h>
-#include <linux/pm_clock.h>
-#include <linux/pm_runtime.h>
#include "pinctrl-lpass-lpi.h"
@@ -141,10 +139,6 @@ static const struct of_device_id lpi_pinctrl_of_match[] = {
};
MODULE_DEVICE_TABLE(of, lpi_pinctrl_of_match);
-static const struct dev_pm_ops lpi_pinctrl_pm_ops = {
- RUNTIME_PM_OPS(pm_clk_suspend, pm_clk_resume, NULL)
-};
-
static struct platform_driver lpi_pinctrl_driver = {
.driver = {
.name = "qcom-sc7280-lpass-lpi-pinctrl",
diff --git a/drivers/pinctrl/qcom/pinctrl-sc8280xp-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-sc8280xp-lpass-lpi.c
index 27c47710365e..cd350a1cde2f 100644
--- a/drivers/pinctrl/qcom/pinctrl-sc8280xp-lpass-lpi.c
+++ b/drivers/pinctrl/qcom/pinctrl-sc8280xp-lpass-lpi.c
@@ -6,8 +6,6 @@
#include <linux/gpio/driver.h>
#include <linux/module.h>
#include <linux/platform_device.h>
-#include <linux/pm_clock.h>
-#include <linux/pm_runtime.h>
#include "pinctrl-lpass-lpi.h"
@@ -175,10 +173,6 @@ static const struct of_device_id lpi_pinctrl_of_match[] = {
};
MODULE_DEVICE_TABLE(of, lpi_pinctrl_of_match);
-static const struct dev_pm_ops lpi_pinctrl_pm_ops = {
- RUNTIME_PM_OPS(pm_clk_suspend, pm_clk_resume, NULL)
-};
-
static struct platform_driver lpi_pinctrl_driver = {
.driver = {
.name = "qcom-sc8280xp-lpass-lpi-pinctrl",
diff --git a/drivers/pinctrl/qcom/pinctrl-sdm660-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-sdm660-lpass-lpi.c
index 7b5aacaae7d7..9742bb5bb39a 100644
--- a/drivers/pinctrl/qcom/pinctrl-sdm660-lpass-lpi.c
+++ b/drivers/pinctrl/qcom/pinctrl-sdm660-lpass-lpi.c
@@ -10,8 +10,6 @@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
-#include <linux/pm_clock.h>
-#include <linux/pm_runtime.h>
#include <linux/pinctrl/pinctrl.h>
#include "pinctrl-lpass-lpi.h"
@@ -147,10 +145,6 @@ static const struct of_device_id sdm660_lpi_pinctrl_of_match[] = {
};
MODULE_DEVICE_TABLE(of, sdm660_lpi_pinctrl_of_match);
-static const struct dev_pm_ops lpi_pinctrl_pm_ops = {
- RUNTIME_PM_OPS(pm_clk_suspend, pm_clk_resume, NULL)
-};
-
static struct platform_driver sdm660_lpi_pinctrl_driver = {
.driver = {
.name = "qcom-sdm660-lpass-lpi-pinctrl",
diff --git a/drivers/pinctrl/qcom/pinctrl-sdm670-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-sdm670-lpass-lpi.c
index 0a31f7ad2e0d..20277990c2cc 100644
--- a/drivers/pinctrl/qcom/pinctrl-sdm670-lpass-lpi.c
+++ b/drivers/pinctrl/qcom/pinctrl-sdm670-lpass-lpi.c
@@ -7,8 +7,6 @@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
-#include <linux/pm_clock.h>
-#include <linux/pm_runtime.h>
#include <linux/pinctrl/pinctrl.h>
#include "pinctrl-lpass-lpi.h"
@@ -153,10 +151,6 @@ static const struct of_device_id sdm670_lpi_pinctrl_of_match[] = {
};
MODULE_DEVICE_TABLE(of, sdm670_lpi_pinctrl_of_match);
-static const struct dev_pm_ops lpi_pinctrl_pm_ops = {
- RUNTIME_PM_OPS(pm_clk_suspend, pm_clk_resume, NULL)
-};
-
static struct platform_driver sdm670_lpi_pinctrl_driver = {
.driver = {
.name = "qcom-sdm670-lpass-lpi-pinctrl",
diff --git a/drivers/pinctrl/qcom/pinctrl-sm4250-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-sm4250-lpass-lpi.c
index 75bafa62426a..3d71aa65e22a 100644
--- a/drivers/pinctrl/qcom/pinctrl-sm4250-lpass-lpi.c
+++ b/drivers/pinctrl/qcom/pinctrl-sm4250-lpass-lpi.c
@@ -7,8 +7,6 @@
#include <linux/gpio/driver.h>
#include <linux/module.h>
#include <linux/platform_device.h>
-#include <linux/pm_clock.h>
-#include <linux/pm_runtime.h>
#include "pinctrl-lpass-lpi.h"
@@ -223,10 +221,6 @@ static const struct of_device_id lpi_pinctrl_of_match[] = {
};
MODULE_DEVICE_TABLE(of, lpi_pinctrl_of_match);
-static const struct dev_pm_ops lpi_pinctrl_pm_ops = {
- RUNTIME_PM_OPS(pm_clk_suspend, pm_clk_resume, NULL)
-};
-
static struct platform_driver lpi_pinctrl_driver = {
.driver = {
.name = "qcom-sm4250-lpass-lpi-pinctrl",
diff --git a/drivers/pinctrl/qcom/pinctrl-sm6115-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-sm6115-lpass-lpi.c
index 05435ea6e17a..d092bd838c3d 100644
--- a/drivers/pinctrl/qcom/pinctrl-sm6115-lpass-lpi.c
+++ b/drivers/pinctrl/qcom/pinctrl-sm6115-lpass-lpi.c
@@ -7,8 +7,6 @@
#include <linux/gpio/driver.h>
#include <linux/module.h>
#include <linux/platform_device.h>
-#include <linux/pm_clock.h>
-#include <linux/pm_runtime.h>
#include "pinctrl-lpass-lpi.h"
@@ -143,10 +141,6 @@ static const struct of_device_id lpi_pinctrl_of_match[] = {
};
MODULE_DEVICE_TABLE(of, lpi_pinctrl_of_match);
-static const struct dev_pm_ops lpi_pinctrl_pm_ops = {
- RUNTIME_PM_OPS(pm_clk_suspend, pm_clk_resume, NULL)
-};
-
static struct platform_driver lpi_pinctrl_driver = {
.driver = {
.name = "qcom-sm6115-lpass-lpi-pinctrl",
diff --git a/drivers/pinctrl/qcom/pinctrl-sm6350-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-sm6350-lpass-lpi.c
index 946b23084304..1d009aac892e 100644
--- a/drivers/pinctrl/qcom/pinctrl-sm6350-lpass-lpi.c
+++ b/drivers/pinctrl/qcom/pinctrl-sm6350-lpass-lpi.c
@@ -6,8 +6,6 @@
#include <linux/gpio/driver.h>
#include <linux/module.h>
#include <linux/platform_device.h>
-#include <linux/pm_clock.h>
-#include <linux/pm_runtime.h>
#include "pinctrl-lpass-lpi.h"
@@ -137,10 +135,6 @@ static const struct of_device_id lpi_pinctrl_of_match[] = {
};
MODULE_DEVICE_TABLE(of, lpi_pinctrl_of_match);
-static const struct dev_pm_ops lpi_pinctrl_pm_ops = {
- RUNTIME_PM_OPS(pm_clk_suspend, pm_clk_resume, NULL)
-};
-
static struct platform_driver lpi_pinctrl_driver = {
.driver = {
.name = "qcom-sm6350-lpass-lpi-pinctrl",
diff --git a/drivers/pinctrl/qcom/pinctrl-sm8250-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-sm8250-lpass-lpi.c
index 454de788be21..26fb78e493ca 100644
--- a/drivers/pinctrl/qcom/pinctrl-sm8250-lpass-lpi.c
+++ b/drivers/pinctrl/qcom/pinctrl-sm8250-lpass-lpi.c
@@ -7,8 +7,6 @@
#include <linux/gpio/driver.h>
#include <linux/module.h>
#include <linux/platform_device.h>
-#include <linux/pm_clock.h>
-#include <linux/pm_runtime.h>
#include "pinctrl-lpass-lpi.h"
@@ -136,10 +134,6 @@ static const struct of_device_id lpi_pinctrl_of_match[] = {
};
MODULE_DEVICE_TABLE(of, lpi_pinctrl_of_match);
-static const struct dev_pm_ops lpi_pinctrl_pm_ops = {
- RUNTIME_PM_OPS(pm_clk_suspend, pm_clk_resume, NULL)
-};
-
static struct platform_driver lpi_pinctrl_driver = {
.driver = {
.name = "qcom-sm8250-lpass-lpi-pinctrl",
diff --git a/drivers/pinctrl/qcom/pinctrl-sm8450-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-sm8450-lpass-lpi.c
index 834eee8dcce9..76bff5854f03 100644
--- a/drivers/pinctrl/qcom/pinctrl-sm8450-lpass-lpi.c
+++ b/drivers/pinctrl/qcom/pinctrl-sm8450-lpass-lpi.c
@@ -6,8 +6,6 @@
#include <linux/gpio/driver.h>
#include <linux/module.h>
#include <linux/platform_device.h>
-#include <linux/pm_clock.h>
-#include <linux/pm_runtime.h>
#include "pinctrl-lpass-lpi.h"
@@ -204,10 +202,6 @@ static const struct of_device_id lpi_pinctrl_of_match[] = {
};
MODULE_DEVICE_TABLE(of, lpi_pinctrl_of_match);
-static const struct dev_pm_ops lpi_pinctrl_pm_ops = {
- RUNTIME_PM_OPS(pm_clk_suspend, pm_clk_resume, NULL)
-};
-
static struct platform_driver lpi_pinctrl_driver = {
.driver = {
.name = "qcom-sm8450-lpass-lpi-pinctrl",
diff --git a/drivers/pinctrl/qcom/pinctrl-sm8550-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-sm8550-lpass-lpi.c
index 875e04e5d2b9..7a36370238a4 100644
--- a/drivers/pinctrl/qcom/pinctrl-sm8550-lpass-lpi.c
+++ b/drivers/pinctrl/qcom/pinctrl-sm8550-lpass-lpi.c
@@ -6,8 +6,6 @@
#include <linux/gpio/driver.h>
#include <linux/module.h>
#include <linux/platform_device.h>
-#include <linux/pm_clock.h>
-#include <linux/pm_runtime.h>
#include "pinctrl-lpass-lpi.h"
@@ -212,10 +210,6 @@ static const struct of_device_id lpi_pinctrl_of_match[] = {
};
MODULE_DEVICE_TABLE(of, lpi_pinctrl_of_match);
-static const struct dev_pm_ops lpi_pinctrl_pm_ops = {
- RUNTIME_PM_OPS(pm_clk_suspend, pm_clk_resume, NULL)
-};
-
static struct platform_driver lpi_pinctrl_driver = {
.driver = {
.name = "qcom-sm8550-lpass-lpi-pinctrl",
diff --git a/drivers/pinctrl/qcom/pinctrl-sm8650-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-sm8650-lpass-lpi.c
index bc7889c993d0..c98d6748560d 100644
--- a/drivers/pinctrl/qcom/pinctrl-sm8650-lpass-lpi.c
+++ b/drivers/pinctrl/qcom/pinctrl-sm8650-lpass-lpi.c
@@ -6,8 +6,6 @@
#include <linux/gpio/driver.h>
#include <linux/module.h>
#include <linux/platform_device.h>
-#include <linux/pm_clock.h>
-#include <linux/pm_runtime.h>
#include "pinctrl-lpass-lpi.h"
@@ -219,10 +217,6 @@ static const struct of_device_id lpi_pinctrl_of_match[] = {
};
MODULE_DEVICE_TABLE(of, lpi_pinctrl_of_match);
-static const struct dev_pm_ops lpi_pinctrl_pm_ops = {
- RUNTIME_PM_OPS(pm_clk_suspend, pm_clk_resume, NULL)
-};
-
static struct platform_driver lpi_pinctrl_driver = {
.driver = {
.name = "qcom-sm8650-lpass-lpi-pinctrl",
--
2.43.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] pinctrl: qcom: lpass-lpi: Force runtime suspend on system sleep
2026-11-18 13:37 [PATCH v2 0/2] pinctrl: qcom: lpass-lpi: Force runtime suspend on system sleep Gopi Chandra Sekhar Reddy Kanala
2026-11-18 13:37 ` [PATCH v2 1/2] pinctrl: qcom: lpass-lpi: Move dev_pm_ops to the common driver Gopi Chandra Sekhar Reddy Kanala
@ 2026-11-18 13:37 ` Gopi Chandra Sekhar Reddy Kanala
2026-11-23 14:48 ` [PATCH v2 0/2] " Bartosz Golaszewski
2 siblings, 0 replies; 5+ messages in thread
From: Gopi Chandra Sekhar Reddy Kanala @ 2026-11-18 13:37 UTC (permalink / raw)
To: Bjorn Andersson, Bartosz Golaszewski, Linus Walleij
Cc: Srinivas Kandagatla, Konrad Dybcio, linux-arm-msm, linux-gpio,
linux-kernel, Gopi Chandra Sekhar Reddy Kanala
The LPASS LPI pin controllers vote for their LPASS clocks through pm_clk
and only implement runtime PM callbacks. Their consumers, such as the
SoundWire controllers, keep them runtime active through their device
links. If a consumer is active when system suspend starts, or is resumed
during it, the runtime PM usage count the PM core holds from the prepare
phase keeps the pin controller from runtime suspending, and its clock
votes are held for the whole suspend. On Glymur CRD this keeps CX and
DDR from collapsing in s2idle.
Use pm_runtime_force_suspend() and pm_runtime_force_resume() as the
system sleep callbacks in the common dev_pm_ops, so the clocks are
always released at system suspend for all the SoC-specific drivers.
Consumers are suspended before their suppliers, so the pin controller
goes down after them and comes back before them.
Signed-off-by: Gopi Chandra Sekhar Reddy Kanala <gopi.kanala@oss.qualcomm.com>
---
drivers/pinctrl/qcom/pinctrl-lpass-lpi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c
index 1f1635ec53d7..f693e5101a7b 100644
--- a/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c
+++ b/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c
@@ -612,6 +612,7 @@ void lpi_pinctrl_remove(struct platform_device *pdev)
EXPORT_SYMBOL_GPL(lpi_pinctrl_remove);
EXPORT_GPL_DEV_PM_OPS(lpi_pinctrl_pm_ops) = {
+ SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
RUNTIME_PM_OPS(pm_clk_suspend, pm_clk_resume, NULL)
};
--
2.43.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/2] pinctrl: qcom: lpass-lpi: Move dev_pm_ops to the common driver
2026-11-18 13:37 ` [PATCH v2 1/2] pinctrl: qcom: lpass-lpi: Move dev_pm_ops to the common driver Gopi Chandra Sekhar Reddy Kanala
@ 2026-11-23 14:37 ` Bartosz Golaszewski
0 siblings, 0 replies; 5+ messages in thread
From: Bartosz Golaszewski @ 2026-11-23 14:37 UTC (permalink / raw)
To: Gopi Chandra Sekhar Reddy Kanala
Cc: Bjorn Andersson, Linus Walleij, Srinivas Kandagatla,
Konrad Dybcio, linux-arm-msm, linux-gpio, linux-kernel
On Wed, Nov 18, 2026 at 07:07:30PM +0530, Gopi Chandra Sekhar Reddy Kanala wrote:
> All the SoC-specific LPASS LPI drivers probe through the common
> lpi_pinctrl_probe(), which sets up pm_clk and runtime PM, and each of
> them defines the same dev_pm_ops with only the pm_clk runtime callbacks.
>
> Define the dev_pm_ops once in the common driver, next to the code that
> sets up pm_clk and runtime PM, and export it for the SoC-specific
> drivers, so the PM callbacks only need to be changed in one place. Drop
> the pm_clock.h and pm_runtime.h includes from the SoC-specific drivers,
> as nothing there uses them anymore.
>
> No functional change.
>
> Signed-off-by: Gopi Chandra Sekhar Reddy Kanala <gopi.kanala@oss.qualcomm.com>
> ---
> drivers/pinctrl/qcom/pinctrl-hawi-lpass-lpi.c | 6 ------
> drivers/pinctrl/qcom/pinctrl-lpass-lpi.c | 4 ++++
> drivers/pinctrl/qcom/pinctrl-lpass-lpi.h | 3 +++
> drivers/pinctrl/qcom/pinctrl-milos-lpass-lpi.c | 6 ------
> drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c | 6 ------
> drivers/pinctrl/qcom/pinctrl-sc8280xp-lpass-lpi.c | 6 ------
> drivers/pinctrl/qcom/pinctrl-sdm660-lpass-lpi.c | 6 ------
> drivers/pinctrl/qcom/pinctrl-sdm670-lpass-lpi.c | 6 ------
> drivers/pinctrl/qcom/pinctrl-sm4250-lpass-lpi.c | 6 ------
> drivers/pinctrl/qcom/pinctrl-sm6115-lpass-lpi.c | 6 ------
> drivers/pinctrl/qcom/pinctrl-sm6350-lpass-lpi.c | 6 ------
> drivers/pinctrl/qcom/pinctrl-sm8250-lpass-lpi.c | 6 ------
> drivers/pinctrl/qcom/pinctrl-sm8450-lpass-lpi.c | 6 ------
> drivers/pinctrl/qcom/pinctrl-sm8550-lpass-lpi.c | 6 ------
> drivers/pinctrl/qcom/pinctrl-sm8650-lpass-lpi.c | 6 ------
> 15 files changed, 7 insertions(+), 78 deletions(-)
>
Ok, I do like this diff after all. I'll queue this for v7.5.
Bart
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 0/2] pinctrl: qcom: lpass-lpi: Force runtime suspend on system sleep
2026-11-18 13:37 [PATCH v2 0/2] pinctrl: qcom: lpass-lpi: Force runtime suspend on system sleep Gopi Chandra Sekhar Reddy Kanala
2026-11-18 13:37 ` [PATCH v2 1/2] pinctrl: qcom: lpass-lpi: Move dev_pm_ops to the common driver Gopi Chandra Sekhar Reddy Kanala
2026-11-18 13:37 ` [PATCH v2 2/2] pinctrl: qcom: lpass-lpi: Force runtime suspend on system sleep Gopi Chandra Sekhar Reddy Kanala
@ 2026-11-23 14:48 ` Bartosz Golaszewski
2 siblings, 0 replies; 5+ messages in thread
From: Bartosz Golaszewski @ 2026-11-23 14:48 UTC (permalink / raw)
To: Bjorn Andersson, Bartosz Golaszewski, Linus Walleij,
Gopi Chandra Sekhar Reddy Kanala
Cc: Bartosz Golaszewski, Srinivas Kandagatla, Konrad Dybcio,
linux-arm-msm, linux-gpio, linux-kernel
On Wed, 18 Nov 2026 19:07:29 +0530, Gopi Chandra Sekhar Reddy Kanala wrote:
> The LPASS LPI pin controllers only have runtime PM callbacks, so their
> clock votes stay held across system suspend when a consumer, such as a
> SoundWire controller, is active when suspend starts. On Glymur CRD this
> keeps CX and DDR from collapsing in s2idle.
>
> Patch 1 moves the dev_pm_ops, which are the same in every SoC-specific
> driver, into the common driver. Patch 2 adds pm_runtime_force_suspend()
> and pm_runtime_force_resume() as the system sleep callbacks there, so
> the fix covers all the SoC-specific drivers.
>
> [...]
Applied, thanks!
[1/2] pinctrl: qcom: lpass-lpi: Move dev_pm_ops to the common driver
https://git.kernel.org/brgl/c/d4a6257af491f8a087d34bd5d3f4cd384d4fe266
[2/2] pinctrl: qcom: lpass-lpi: Force runtime suspend on system sleep
https://git.kernel.org/brgl/c/55d571be69fa9b1ecf8b417fdf768c4eb8b28d23
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-23 14:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-18 13:37 [PATCH v2 0/2] pinctrl: qcom: lpass-lpi: Force runtime suspend on system sleep Gopi Chandra Sekhar Reddy Kanala
2026-11-18 13:37 ` [PATCH v2 1/2] pinctrl: qcom: lpass-lpi: Move dev_pm_ops to the common driver Gopi Chandra Sekhar Reddy Kanala
2026-11-23 14:37 ` Bartosz Golaszewski
2026-11-18 13:37 ` [PATCH v2 2/2] pinctrl: qcom: lpass-lpi: Force runtime suspend on system sleep Gopi Chandra Sekhar Reddy Kanala
2026-11-23 14:48 ` [PATCH v2 0/2] " Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®