Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

thermal: add the support for building the generic thermal as a module

Build the generic thermal driver as module "thermal_sys".

Make ACPI thermal, video, processor and fan SELECT the generic
thermal driver, as these drivers rely on it to build the sysfs I/F.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Len Brown <len.brown@intel.com>

authored by

Zhang Rui and committed by
Len Brown
63c4ec90 a01e035e

+9 -18
+3
drivers/acpi/Kconfig
··· 140 140 tristate "Video" 141 141 depends on X86 && BACKLIGHT_CLASS_DEVICE && VIDEO_OUTPUT_CONTROL 142 142 depends on INPUT 143 + select THERMAL 143 144 help 144 145 This driver implement the ACPI Extensions For Display Adapters 145 146 for integrated graphics devices on motherboard, as specified in ··· 152 151 153 152 config ACPI_FAN 154 153 tristate "Fan" 154 + select THERMAL 155 155 default y 156 156 help 157 157 This driver adds support for ACPI fan devices, allowing user-mode ··· 174 172 175 173 config ACPI_PROCESSOR 176 174 tristate "Processor" 175 + select THERMAL 177 176 default y 178 177 help 179 178 This driver installs ACPI as the idle handler for Linux, and uses
+1
drivers/misc/Kconfig
··· 344 344 config INTEL_MENLOW 345 345 tristate "Thermal Management driver for Intel menlow platform" 346 346 depends on ACPI_THERMAL 347 + select THERMAL 347 348 depends on X86 348 349 ---help--- 349 350 ACPI thermal management enhancement driver on
+2 -2
drivers/thermal/Kconfig
··· 3 3 # 4 4 5 5 menuconfig THERMAL 6 - bool "Generic Thermal sysfs driver" 6 + tristate "Generic Thermal sysfs driver" 7 7 help 8 8 Generic Thermal Sysfs driver offers a generic mechanism for 9 9 thermal management. Usually it's made up of one or more thermal ··· 11 11 Each thermal zone contains its own temperature, trip points, 12 12 cooling devices. 13 13 All platforms with ACPI thermal support can use this driver. 14 - If you want this support, you should say Y here. 14 + If you want this support, you should say Y or M here.
+2 -1
drivers/thermal/Makefile
··· 2 2 # Makefile for sensor chip drivers. 3 3 # 4 4 5 - obj-$(CONFIG_THERMAL) += thermal.o 5 + thermal_sys-objs += thermal.o 6 + obj-$(CONFIG_THERMAL) += thermal_sys.o
+1 -1
drivers/thermal/thermal.c
··· 31 31 #include <linux/thermal.h> 32 32 #include <linux/spinlock.h> 33 33 34 - MODULE_AUTHOR("Zhang Rui") 34 + MODULE_AUTHOR("Zhang Rui"); 35 35 MODULE_DESCRIPTION("Generic thermal management sysfs support"); 36 36 MODULE_LICENSE("GPL"); 37 37
-14
include/linux/thermal.h
··· 88 88 struct thermal_cooling_device *); 89 89 int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, 90 90 struct thermal_cooling_device *); 91 - 92 - #ifdef CONFIG_THERMAL 93 91 struct thermal_cooling_device *thermal_cooling_device_register(char *, void *, 94 92 struct 95 93 thermal_cooling_device_ops 96 94 *); 97 95 void thermal_cooling_device_unregister(struct thermal_cooling_device *); 98 - #else 99 - static inline struct thermal_cooling_device 100 - *thermal_cooling_device_register(char *c, void *v, 101 - struct thermal_cooling_device_ops *t) 102 - { 103 - return NULL; 104 - } 105 - static inline 106 - void thermal_cooling_device_unregister(struct thermal_cooling_device *t) 107 - { 108 - }; 109 - #endif 110 96 111 97 #endif /* __THERMAL_H__ */