ACPI: thermal: add DMI hooks to handle AOpen's broken Award BIOS

Use DMI to:
1. enable polling (BIOS thermal events are broken)
2. disable active trip points (BIOS fan control is broken)
3. disable passive trip point (BIOS hard-codes it too low)

The actual temperature reading does work,
and with the aid of polling, the critical
trip point should work too.

http://bugzilla.kernel.org/show_bug.cgi?id=8842

Signed-off-by: Len Brown <len.brown@intel.com>

Len Brown 0b5bfa1c f8707ec9

+65
+65
drivers/acpi/thermal.c
··· 33 33 34 34 #include <linux/kernel.h> 35 35 #include <linux/module.h> 36 + #include <linux/dmi.h> 36 37 #include <linux/init.h> 37 38 #include <linux/types.h> 38 39 #include <linux/proc_fs.h> ··· 1329 1328 return AE_OK; 1330 1329 } 1331 1330 1331 + #ifdef CONFIG_DMI 1332 + static int thermal_act(struct dmi_system_id *d) { 1333 + 1334 + if (act == 0) { 1335 + printk(KERN_NOTICE "ACPI: %s detected: " 1336 + "disabling all active thermal trip points\n", d->ident); 1337 + act = -1; 1338 + } 1339 + return 0; 1340 + } 1341 + static int thermal_tzp(struct dmi_system_id *d) { 1342 + 1343 + if (tzp == 0) { 1344 + printk(KERN_NOTICE "ACPI: %s detected: " 1345 + "enabling thermal zone polling\n", d->ident); 1346 + tzp = 300; /* 300 dS = 30 Seconds */ 1347 + } 1348 + return 0; 1349 + } 1350 + static int thermal_psv(struct dmi_system_id *d) { 1351 + 1352 + if (psv == 0) { 1353 + printk(KERN_NOTICE "ACPI: %s detected: " 1354 + "disabling all passive thermal trip points\n", d->ident); 1355 + psv = -1; 1356 + } 1357 + return 0; 1358 + } 1359 + 1360 + static struct dmi_system_id thermal_dmi_table[] __initdata = { 1361 + /* 1362 + * Award BIOS on this AOpen makes thermal control almost worthless. 1363 + * http://bugzilla.kernel.org/show_bug.cgi?id=8842 1364 + */ 1365 + { 1366 + .callback = thermal_act, 1367 + .ident = "AOpen i915GMm-HFS", 1368 + .matches = { 1369 + DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"), 1370 + DMI_MATCH(DMI_BOARD_NAME, "i915GMm-HFS"), 1371 + }, 1372 + }, 1373 + { 1374 + .callback = thermal_psv, 1375 + .ident = "AOpen i915GMm-HFS", 1376 + .matches = { 1377 + DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"), 1378 + DMI_MATCH(DMI_BOARD_NAME, "i915GMm-HFS"), 1379 + }, 1380 + }, 1381 + { 1382 + .callback = thermal_tzp, 1383 + .ident = "AOpen i915GMm-HFS", 1384 + .matches = { 1385 + DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"), 1386 + DMI_MATCH(DMI_BOARD_NAME, "i915GMm-HFS"), 1387 + }, 1388 + }, 1389 + {} 1390 + }; 1391 + #endif /* CONFIG_DMI */ 1392 + 1332 1393 static int __init acpi_thermal_init(void) 1333 1394 { 1334 1395 int result = 0; 1396 + 1397 + dmi_check_system(thermal_dmi_table); 1335 1398 1336 1399 if (off) { 1337 1400 printk(KERN_NOTICE "ACPI: thermal control disabled\n");