From 8bd1c06556f92a044177570f64429f097b334a31 Mon Sep 17 00:00:00 2001 From: Len Brown Date: Sun, 12 Aug 2007 00:13:02 -0400 Subject: [PATCH] --- yaml --- r: 63951 b: refs/heads/master c: 0b5bfa1cbefdc6e4c60f30ed545389b5ffe0f75f h: refs/heads/master i: 63949: 1ff66847d4b2d4ebc81b1b8c9d065bddf6499bc8 63947: 16a950db3b9073485a121ffb0691669c8c9a3549 63943: ce3a0686f7c61b9de078f935fe4a5af0811ee703 63935: ba2833d56763a5de6a0e10ea21fcf88f9bd5cb12 v: v3 --- [refs] | 2 +- trunk/drivers/acpi/thermal.c | 65 ++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 5c5e45d40476..d5430a73840c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f8707ec9643769957065405b5090e4aa64fd8214 +refs/heads/master: 0b5bfa1cbefdc6e4c60f30ed545389b5ffe0f75f diff --git a/trunk/drivers/acpi/thermal.c b/trunk/drivers/acpi/thermal.c index 3521c37bbd33..1e06159fd9c4 100644 --- a/trunk/drivers/acpi/thermal.c +++ b/trunk/drivers/acpi/thermal.c @@ -33,6 +33,7 @@ #include #include +#include #include #include #include @@ -1328,10 +1329,74 @@ static int acpi_thermal_resume(struct acpi_device *device) return AE_OK; } +#ifdef CONFIG_DMI +static int thermal_act(struct dmi_system_id *d) { + + if (act == 0) { + printk(KERN_NOTICE "ACPI: %s detected: " + "disabling all active thermal trip points\n", d->ident); + act = -1; + } + return 0; +} +static int thermal_tzp(struct dmi_system_id *d) { + + if (tzp == 0) { + printk(KERN_NOTICE "ACPI: %s detected: " + "enabling thermal zone polling\n", d->ident); + tzp = 300; /* 300 dS = 30 Seconds */ + } + return 0; +} +static int thermal_psv(struct dmi_system_id *d) { + + if (psv == 0) { + printk(KERN_NOTICE "ACPI: %s detected: " + "disabling all passive thermal trip points\n", d->ident); + psv = -1; + } + return 0; +} + +static struct dmi_system_id thermal_dmi_table[] __initdata = { + /* + * Award BIOS on this AOpen makes thermal control almost worthless. + * http://bugzilla.kernel.org/show_bug.cgi?id=8842 + */ + { + .callback = thermal_act, + .ident = "AOpen i915GMm-HFS", + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"), + DMI_MATCH(DMI_BOARD_NAME, "i915GMm-HFS"), + }, + }, + { + .callback = thermal_psv, + .ident = "AOpen i915GMm-HFS", + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"), + DMI_MATCH(DMI_BOARD_NAME, "i915GMm-HFS"), + }, + }, + { + .callback = thermal_tzp, + .ident = "AOpen i915GMm-HFS", + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"), + DMI_MATCH(DMI_BOARD_NAME, "i915GMm-HFS"), + }, + }, + {} +}; +#endif /* CONFIG_DMI */ + static int __init acpi_thermal_init(void) { int result = 0; + dmi_check_system(thermal_dmi_table); + if (off) { printk(KERN_NOTICE "ACPI: thermal control disabled\n"); return -ENODEV;