Skip to contentSkip to conversation

thermal/drivers/core: Remove the module Kconfig's option

PATCH In review Daniel Lezcano 4 participants 5 messages Apr 1, 2019 – Apr 3, 2019

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

PATCH 1/1 thermal/drivers/core: Remove the module Kconfig's option

The module support for the thermal subsystem does have a little sense:
- some subsystems relying on it are not modules, thus forcing the framework to be compiled in
- it is compiled in for almost every configs, the remaining ones are a few platforms where I don't see why we can not switch the thermal to 'y'. The drivers can stay in tristate.
- platforms need the thermal to be ready as soon as possible at boot time in order to mitigate

Usually the subsystems framework are compiled-in and the plugs are as module.

Remove the module option. The removal of the module related dead code will come after this patch gets in or is acked.

---
 arch/arm/configs/mini2440_defconfig        | 2 +-
 arch/arm/configs/pxa_defconfig             | 2 +-
 arch/mips/configs/ip22_defconfig           | 2 +-
 arch/mips/configs/ip27_defconfig           | 2 +-
 arch/unicore32/configs/unicore32_defconfig | 2 +-
 drivers/thermal/Kconfig                    | 4 ++--
 6 files changed, 7 insertions(+), 7 deletions(-)
arch/arm/configs/mini2440_defconfig +1 -1
index d95a8059d30b..0cf1c120c4bb 100644
@@ -152,7 +152,7 @@ CONFIG_SPI_S3C24XX=y
 CONFIG_SPI_SPIDEV=y
 CONFIG_GPIO_SYSFS=y
 CONFIG_SENSORS_LM75=y
-CONFIG_THERMAL=m
+CONFIG_THERMAL=y
 CONFIG_WATCHDOG=y
 CONFIG_S3C2410_WATCHDOG=y
 CONFIG_FB=y
arch/arm/configs/pxa_defconfig +1 -1
index d4654755b09c..d4f9dda3a52f 100644
@@ -387,7 +387,7 @@ CONFIG_SENSORS_LM75=m
 CONFIG_SENSORS_LM90=m
 CONFIG_SENSORS_LM95245=m
 CONFIG_SENSORS_NTC_THERMISTOR=m
-CONFIG_THERMAL=m
+CONFIG_THERMAL=y
 CONFIG_WATCHDOG=y
 CONFIG_XILINX_WATCHDOG=m
 CONFIG_SA1100_WATCHDOG=m
arch/mips/configs/ip22_defconfig +1 -1
index ff40fbc2f439..21a1168ae301 100644
@@ -228,7 +228,7 @@ CONFIG_SERIAL_IP22_ZILOG=m
 # CONFIG_HW_RANDOM is not set
 CONFIG_RAW_DRIVER=m
 # CONFIG_HWMON is not set
-CONFIG_THERMAL=m
+CONFIG_THERMAL=y
 CONFIG_WATCHDOG=y
 CONFIG_INDYDOG=m
 # CONFIG_VGA_CONSOLE is not set
arch/mips/configs/ip27_defconfig +1 -1
index 81c47e18131b..54db5dedf776 100644
@@ -271,7 +271,7 @@ CONFIG_I2C_PARPORT_LIGHT=m
 CONFIG_I2C_TAOS_EVM=m
 CONFIG_I2C_STUB=m
 # CONFIG_HWMON is not set
-CONFIG_THERMAL=m
+CONFIG_THERMAL=y
 CONFIG_MFD_PCF50633=m
 CONFIG_PCF50633_ADC=m
 CONFIG_PCF50633_GPIO=m
arch/unicore32/configs/unicore32_defconfig +1 -1
index aebd01fc28e5..360cc9abcdb0 100644
@@ -119,7 +119,7 @@ CONFIG_I2C_PUV3=y
 #	Hardware Monitoring support
 #CONFIG_SENSORS_LM75=m
 #	Generic Thermal sysfs driver
-#CONFIG_THERMAL=m
+#CONFIG_THERMAL=y
 #CONFIG_THERMAL_HWMON=y
 
 #	Multimedia support
drivers/thermal/Kconfig +2 -2
index 653aa27a25a4..ccf5b9408d7a 100644
@@ -3,7 +3,7 @@
 #
 
 menuconfig THERMAL
-	tristate "Generic Thermal sysfs driver"
+	bool "Generic Thermal sysfs driver"
 	help
 	  Generic Thermal Sysfs driver offers a generic mechanism for
 	  thermal management. Usually it's made up of one or more thermal
@@ -11,7 +11,7 @@ menuconfig THERMAL
 	  Each thermal zone contains its own temperature, trip points,
 	  cooling devices.
 	  All platforms with ACPI thermal support can use this driver.
-	  If you want this support, you should say Y or M here.
+	  If you want this support, you should say Y here.
 
 if THERMAL
 
Signature · 1 line
2.17.1
Acked-by on v1 1/1
#1 lore raw
Quoted 2 lines · Daniel Lezcano

The module support for the thermal subsystem does have a little sense:

Do you mean "makes little sense" ?

Quoted 8 lines

- some subsystems relying on it are not modules, thus forcing the framework to be compiled in
- it is compiled in for almost every configs, the remaining ones are a few platforms where I don't see why we can not switch the thermal to 'y'. The drivers can stay in tristate.
- platforms need the thermal to be ready as soon as possible at boot time in order to mitigate

Quoted 6 lines

Usually the subsystems framework are compiled-in and the plugs are as module.

Remove the module option. The removal of the module related dead code will come after this patch gets in or is acked.

Sounds like a good idea.

Many dependencies such as the following can probably be simplified or removed after this patch has been accepted.

depends on THERMAL=y
depends on THERMAL || THERMAL=n
depends on (HWMON && (THERMAL || !THERMAL_OF)) || !HWMON depends on !(MLXSW_CORE=y && THERMAL=m)

depends on THERMAL || !THERMAL
depends on HWMON=y || HWMON=THERMAL
depends on THERMAL || !THERMAL_OF
Quoted 99 lines
---
 arch/arm/configs/mini2440_defconfig        | 2 +-
 arch/arm/configs/pxa_defconfig             | 2 +-
 arch/mips/configs/ip22_defconfig           | 2 +-
 arch/mips/configs/ip27_defconfig           | 2 +-
 arch/unicore32/configs/unicore32_defconfig | 2 +-
 drivers/thermal/Kconfig                    | 4 ++--
 6 files changed, 7 insertions(+), 7 deletions(-)
arch/arm/configs/mini2440_defconfig +1 -1
index d95a8059d30b..0cf1c120c4bb 100644
@@ -152,7 +152,7 @@ CONFIG_SPI_S3C24XX=y
 CONFIG_SPI_SPIDEV=y
 CONFIG_GPIO_SYSFS=y
 CONFIG_SENSORS_LM75=y
-CONFIG_THERMAL=m
+CONFIG_THERMAL=y
 CONFIG_WATCHDOG=y
 CONFIG_S3C2410_WATCHDOG=y
 CONFIG_FB=y
arch/arm/configs/pxa_defconfig +1 -1
index d4654755b09c..d4f9dda3a52f 100644
@@ -387,7 +387,7 @@ CONFIG_SENSORS_LM75=m
 CONFIG_SENSORS_LM90=m
 CONFIG_SENSORS_LM95245=m
 CONFIG_SENSORS_NTC_THERMISTOR=m
-CONFIG_THERMAL=m
+CONFIG_THERMAL=y
 CONFIG_WATCHDOG=y
 CONFIG_XILINX_WATCHDOG=m
 CONFIG_SA1100_WATCHDOG=m
arch/mips/configs/ip22_defconfig +1 -1
index ff40fbc2f439..21a1168ae301 100644
@@ -228,7 +228,7 @@ CONFIG_SERIAL_IP22_ZILOG=m
 # CONFIG_HW_RANDOM is not set
 CONFIG_RAW_DRIVER=m
 # CONFIG_HWMON is not set
-CONFIG_THERMAL=m
+CONFIG_THERMAL=y
 CONFIG_WATCHDOG=y
 CONFIG_INDYDOG=m
 # CONFIG_VGA_CONSOLE is not set
arch/mips/configs/ip27_defconfig +1 -1
index 81c47e18131b..54db5dedf776 100644
@@ -271,7 +271,7 @@ CONFIG_I2C_PARPORT_LIGHT=m
 CONFIG_I2C_TAOS_EVM=m
 CONFIG_I2C_STUB=m
 # CONFIG_HWMON is not set
-CONFIG_THERMAL=m
+CONFIG_THERMAL=y
 CONFIG_MFD_PCF50633=m
 CONFIG_PCF50633_ADC=m
 CONFIG_PCF50633_GPIO=m
arch/unicore32/configs/unicore32_defconfig +1 -1
index aebd01fc28e5..360cc9abcdb0 100644
@@ -119,7 +119,7 @@ CONFIG_I2C_PUV3=y
 #      Hardware Monitoring support
 #CONFIG_SENSORS_LM75=m
 #      Generic Thermal sysfs driver
-#CONFIG_THERMAL=m
+#CONFIG_THERMAL=y
 #CONFIG_THERMAL_HWMON=y
 
 #      Multimedia support
drivers/thermal/Kconfig +2 -3
index 653aa27a25a4..ccf5b9408d7a 100644
@@ -3,7 +3,7 @@
 #
 
 menuconfig THERMAL
-       tristate "Generic Thermal sysfs driver"
+       bool "Generic Thermal sysfs driver"
        help
          Generic Thermal Sysfs driver offers a generic mechanism for
          thermal management. Usually it's made up of one or more thermal
@@ -11,7 +11,7 @@ menuconfig THERMAL
          Each thermal zone contains its own temperature, trip points,
          cooling devices.
          All platforms with ACPI thermal support can use this driver.
-         If you want this support, you should say Y or M here.
+         If you want this support, you should say Y here.
 
 if THERMAL
 
--

2.17.1

#2 lore raw

Hi Guenter,

thanks for the review.

Quoted 6 lines · Guenter Roeck
Quoted 2 lines · Daniel Lezcano

The module support for the thermal subsystem does have a little sense:

Do you mean "makes little sense" ?

yep :)

Quoted 22 lines
Quoted 8 lines

- some subsystems relying on it are not modules, thus forcing the framework to be compiled in
- it is compiled in for almost every configs, the remaining ones are a few platforms where I don't see why we can not switch the thermal to 'y'. The drivers can stay in tristate.
- platforms need the thermal to be ready as soon as possible at boot time in order to mitigate

Quoted 6 lines

Usually the subsystems framework are compiled-in and the plugs are as module.

Remove the module option. The removal of the module related dead code will come after this patch gets in or is acked.

Sounds like a good idea.

Many dependencies such as the following can probably be simplified or removed after this patch has been accepted.

Quoted 7 lines

depends on THERMAL=y
depends on THERMAL || THERMAL=n
depends on (HWMON && (THERMAL || !THERMAL_OF)) || !HWMON depends on !(MLXSW_CORE=y && THERMAL=m)

depends on THERMAL || !THERMAL
depends on HWMON=y || HWMON=THERMAL
depends on THERMAL || !THERMAL_OF

Absolutely.

-- Daniel

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
Acked-by on v1 1/1
#3 lore raw
In reply to Daniel Lezcano
Quoted 10 lines · Daniel Lezcano

The module support for the thermal subsystem does have a little sense:
- some subsystems relying on it are not modules, thus forcing the framework to be compiled in
- it is compiled in for almost every configs, the remaining ones are a few platforms where I don't see why we can not switch the thermal to 'y'. The drivers can stay in tristate.
- platforms need the thermal to be ready as soon as possible at boot time in order to mitigate

Quoted 8 lines

Usually the subsystems framework are compiled-in and the plugs are as module.

Remove the module option. The removal of the module related dead code will come after this patch gets in or is acked.

---
 arch/arm/configs/mini2440_defconfig        | 2 +-

For mini2440:

Best regards,
Krzysztof

Reviewed-by on v1 1/1
#4 lore raw
In reply to Daniel Lezcano
Quoted 10 lines · Daniel Lezcano

The module support for the thermal subsystem does have a little sense:
- some subsystems relying on it are not modules, thus forcing the framework to be compiled in
- it is compiled in for almost every configs, the remaining ones are a few platforms where I don't see why we can not switch the thermal to 'y'. The drivers can stay in tristate.
- platforms need the thermal to be ready as soon as possible at boot time in order to mitigate

Quoted 6 lines

Usually the subsystems framework are compiled-in and the plugs are as module.

Remove the module option. The removal of the module related dead code will come after this patch gets in or is acked.

Quoted 99 lines
---
 arch/arm/configs/mini2440_defconfig        | 2 +-
 arch/arm/configs/pxa_defconfig             | 2 +-
 arch/mips/configs/ip22_defconfig           | 2 +-
 arch/mips/configs/ip27_defconfig           | 2 +-
 arch/unicore32/configs/unicore32_defconfig | 2 +-
 drivers/thermal/Kconfig                    | 4 ++--
 6 files changed, 7 insertions(+), 7 deletions(-)
arch/arm/configs/mini2440_defconfig +1 -1
index d95a8059d30b..0cf1c120c4bb 100644
@@ -152,7 +152,7 @@ CONFIG_SPI_S3C24XX=y
 CONFIG_SPI_SPIDEV=y
 CONFIG_GPIO_SYSFS=y
 CONFIG_SENSORS_LM75=y
-CONFIG_THERMAL=m
+CONFIG_THERMAL=y
 CONFIG_WATCHDOG=y
 CONFIG_S3C2410_WATCHDOG=y
 CONFIG_FB=y
arch/arm/configs/pxa_defconfig +1 -1
index d4654755b09c..d4f9dda3a52f 100644
@@ -387,7 +387,7 @@ CONFIG_SENSORS_LM75=m
 CONFIG_SENSORS_LM90=m
 CONFIG_SENSORS_LM95245=m
 CONFIG_SENSORS_NTC_THERMISTOR=m
-CONFIG_THERMAL=m
+CONFIG_THERMAL=y
 CONFIG_WATCHDOG=y
 CONFIG_XILINX_WATCHDOG=m
 CONFIG_SA1100_WATCHDOG=m
arch/mips/configs/ip22_defconfig +1 -1
index ff40fbc2f439..21a1168ae301 100644
@@ -228,7 +228,7 @@ CONFIG_SERIAL_IP22_ZILOG=m
 # CONFIG_HW_RANDOM is not set
 CONFIG_RAW_DRIVER=m
 # CONFIG_HWMON is not set
-CONFIG_THERMAL=m
+CONFIG_THERMAL=y
 CONFIG_WATCHDOG=y
 CONFIG_INDYDOG=m
 # CONFIG_VGA_CONSOLE is not set
arch/mips/configs/ip27_defconfig +1 -1
index 81c47e18131b..54db5dedf776 100644
@@ -271,7 +271,7 @@ CONFIG_I2C_PARPORT_LIGHT=m
 CONFIG_I2C_TAOS_EVM=m
 CONFIG_I2C_STUB=m
 # CONFIG_HWMON is not set
-CONFIG_THERMAL=m
+CONFIG_THERMAL=y
 CONFIG_MFD_PCF50633=m
 CONFIG_PCF50633_ADC=m
 CONFIG_PCF50633_GPIO=m
arch/unicore32/configs/unicore32_defconfig +1 -1
index aebd01fc28e5..360cc9abcdb0 100644
@@ -119,7 +119,7 @@ CONFIG_I2C_PUV3=y
 #      Hardware Monitoring support
 #CONFIG_SENSORS_LM75=m
 #      Generic Thermal sysfs driver
-#CONFIG_THERMAL=m
+#CONFIG_THERMAL=y
 #CONFIG_THERMAL_HWMON=y
 
 #      Multimedia support
drivers/thermal/Kconfig +2 -3
index 653aa27a25a4..ccf5b9408d7a 100644
@@ -3,7 +3,7 @@
 #
 
 menuconfig THERMAL
-       tristate "Generic Thermal sysfs driver"
+       bool "Generic Thermal sysfs driver"
        help
          Generic Thermal Sysfs driver offers a generic mechanism for
          thermal management. Usually it's made up of one or more thermal
@@ -11,7 +11,7 @@ menuconfig THERMAL
          Each thermal zone contains its own temperature, trip points,
          cooling devices.
          All platforms with ACPI thermal support can use this driver.
-         If you want this support, you should say Y or M here.
+         If you want this support, you should say Y here.
 
 if THERMAL
 
--

2.17.1