Skip to contentSkip to conversation

thermal: qcom: lmh: enable COMPILE_TEST testing

PATCH Applied Dmitry Baryshkov 2 participants 4 messages Jul 28, 2025 – Aug 1, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v2 cover thermal: qcom: lmh: enable COMPILE_TEST testing

Rework Kconfig dependencies and make LMH driver subject to the COMPILE_TEST testing.

---
Changes in v2:
- Added missing includes (LKP)
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Dmitry Baryshkov (2):
thermal: qcom: make LMH select QCOM_SCM
thermal: qcom: lmh: add missing IRQ includes

 drivers/thermal/qcom/Kconfig | 3 ++-
 drivers/thermal/qcom/lmh.c   | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

---
base-commit: a933d3dc1968fcfb0ab72879ec304b1971ed1b9a
change-id: 20250725-lmh-scm-5eca13e07a20

Best regards,

Signature · 2 lines
With best wishes
Dmitry
#1 lore raw

PATCH v2 1/2 thermal: qcom: make LMH select QCOM_SCM

The QCOM_SCM symbol is not user-visible, so it makes little sense to depend on it. Make LMH driver select QCOM_SCM as all other drivers do and, as the dependecy is now correctly handled, enable || COMPILE_TEST in order to include the driver into broader set of build tests.

Fixes 9e5a4fb84230 ("thermal/drivers/qcom/lmh: make QCOM_LMH depends on QCOM_SCM")
---
 drivers/thermal/qcom/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/thermal/qcom/Kconfig +2 -1
index 2c7f3f9a26ebbba41b89c8aa5d310048e8d6c792..a6bb01082ec6978afb5df32464cf591e4670549e 100644
@@ -34,7 +34,8 @@ config QCOM_SPMI_TEMP_ALARM
 
 config QCOM_LMH
 	tristate "Qualcomm Limits Management Hardware"
-	depends on ARCH_QCOM && QCOM_SCM
+	depends on ARCH_QCOM || COMPILE_TEST
+	select QCOM_SCM
 	help
 	  This enables initialization of Qualcomm limits management
 	  hardware(LMh). LMh allows for hardware-enforced mitigation for cpus based on
Signature · 1 line
2.39.5
#2 lore raw

PATCH v2 2/2 thermal: qcom: lmh: add missing IRQ includes

In reply to Dmitry Baryshkov

As reported by LKP, the Qualcomm LMH driver needs to include several IRQ-related headers, which decrlare necessary IRQ functionality. Currently driver builds on ARM64 platforms, where the headers are pulled in implicitly by other headers, but fails to build on other platforms.

Fixes 53bca371cdf7 ("thermal/drivers/qcom: Add support for LMh driver")
---
 drivers/thermal/qcom/lmh.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/thermal/qcom/lmh.c +2 -0
index 75eaa9a68ab8aad7f7dcb575b3ea34b9a12a0dbf..c681a3c89ffa0b9aa0713d6db45f444cb79bcf03 100644
@@ -5,6 +5,8 @@
  */
 #include <linux/module.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
+#include <linux/irqdesc.h>
 #include <linux/irqdomain.h>
 #include <linux/err.h>
 #include <linux/platform_device.h>
Signature · 1 line
2.39.5
#3 lore raw
In reply to Dmitry Baryshkov
Quoted 5 lines · Dmitry Baryshkov

Rework Kconfig dependencies and make LMH driver subject to the COMPILE_TEST testing.

---

Applied, thanks

Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog