Skip to content

Commit

Permalink
thermal: add the support for building the generic thermal as a module
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
zhang-rui authored and lenb committed Apr 29, 2008
1 parent a01e035 commit 63c4ec9
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 18 deletions.
3 changes: 3 additions & 0 deletions drivers/acpi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ config ACPI_VIDEO
tristate "Video"
depends on X86 && BACKLIGHT_CLASS_DEVICE && VIDEO_OUTPUT_CONTROL
depends on INPUT
select THERMAL
help
This driver implement the ACPI Extensions For Display Adapters
for integrated graphics devices on motherboard, as specified in
Expand All @@ -151,6 +152,7 @@ config ACPI_VIDEO

config ACPI_FAN
tristate "Fan"
select THERMAL
default y
help
This driver adds support for ACPI fan devices, allowing user-mode
Expand All @@ -172,6 +174,7 @@ config ACPI_BAY

config ACPI_PROCESSOR
tristate "Processor"
select THERMAL
default y
help
This driver installs ACPI as the idle handler for Linux, and uses
Expand Down
1 change: 1 addition & 0 deletions drivers/misc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ config ATMEL_SSC
config INTEL_MENLOW
tristate "Thermal Management driver for Intel menlow platform"
depends on ACPI_THERMAL
select THERMAL
depends on X86
---help---
ACPI thermal management enhancement driver on
Expand Down
4 changes: 2 additions & 2 deletions drivers/thermal/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
#

menuconfig THERMAL
bool "Generic Thermal sysfs driver"
tristate "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
zone and cooling device.
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 here.
If you want this support, you should say Y or M here.
3 changes: 2 additions & 1 deletion drivers/thermal/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
# Makefile for sensor chip drivers.
#

obj-$(CONFIG_THERMAL) += thermal.o
thermal_sys-objs += thermal.o
obj-$(CONFIG_THERMAL) += thermal_sys.o
2 changes: 1 addition & 1 deletion drivers/thermal/thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <linux/thermal.h>
#include <linux/spinlock.h>

MODULE_AUTHOR("Zhang Rui")
MODULE_AUTHOR("Zhang Rui");
MODULE_DESCRIPTION("Generic thermal management sysfs support");
MODULE_LICENSE("GPL");

Expand Down
14 changes: 0 additions & 14 deletions include/linux/thermal.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,24 +88,10 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int,
struct thermal_cooling_device *);
int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int,
struct thermal_cooling_device *);

#ifdef CONFIG_THERMAL
struct thermal_cooling_device *thermal_cooling_device_register(char *, void *,
struct
thermal_cooling_device_ops
*);
void thermal_cooling_device_unregister(struct thermal_cooling_device *);
#else
static inline struct thermal_cooling_device
*thermal_cooling_device_register(char *c, void *v,
struct thermal_cooling_device_ops *t)
{
return NULL;
}
static inline
void thermal_cooling_device_unregister(struct thermal_cooling_device *t)
{
};
#endif

#endif /* __THERMAL_H__ */

0 comments on commit 63c4ec9

Please sign in to comment.