diff options
author | Luca Tettamanti <kronos.it@gmail.com> | 2011-01-22 10:07:11 -0500 |
---|---|---|
committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2011-01-23 12:30:08 -0500 |
commit | 86ca33e82597c0aeb15fbdfb9619e86ef6b0f704 (patch) | |
tree | affd4f5f31d8295f0f629512325ece4621ba78f4 /drivers/hwmon/asus_atk0110.c | |
parent | 9d1f8a40ddab65a5cedb69b369ee4c0c6e4acf6b (diff) |
hwmon: (asus_atk0110) Override interface detection on Sabertooth X58
ASUS Sabertooth X58 has a bug in ACPI that prevents the reading of MCH
temperature when the "old" ATK0110 interface is used. Add a DMI entry
to override the detection heuristic and force the use of the "new"
interface on this board.
Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Tested-by: Joris Creyghton <jorisctn@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Diffstat (limited to 'drivers/hwmon/asus_atk0110.c')
-rw-r--r-- | drivers/hwmon/asus_atk0110.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon/asus_atk0110.c index 2d68cf3c223b..b5e892017e0c 100644 --- a/drivers/hwmon/asus_atk0110.c +++ b/drivers/hwmon/asus_atk0110.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/list.h> | 13 | #include <linux/list.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
16 | #include <linux/dmi.h> | ||
16 | 17 | ||
17 | #include <acpi/acpi.h> | 18 | #include <acpi/acpi.h> |
18 | #include <acpi/acpixf.h> | 19 | #include <acpi/acpixf.h> |
@@ -22,6 +23,21 @@ | |||
22 | 23 | ||
23 | #define ATK_HID "ATK0110" | 24 | #define ATK_HID "ATK0110" |
24 | 25 | ||
26 | static bool new_if; | ||
27 | module_param(new_if, bool, 0); | ||
28 | MODULE_PARM_DESC(new_if, "Override detection heuristic and force the use of the new ATK0110 interface"); | ||
29 | |||
30 | static const struct dmi_system_id __initconst atk_force_new_if[] = { | ||
31 | { | ||
32 | /* Old interface has broken MCH temp monitoring */ | ||
33 | .ident = "Asus Sabertooth X58", | ||
34 | .matches = { | ||
35 | DMI_MATCH(DMI_BOARD_NAME, "SABERTOOTH X58") | ||
36 | } | ||
37 | }, | ||
38 | { } | ||
39 | }; | ||
40 | |||
25 | /* Minimum time between readings, enforced in order to avoid | 41 | /* Minimum time between readings, enforced in order to avoid |
26 | * hogging the CPU. | 42 | * hogging the CPU. |
27 | */ | 43 | */ |
@@ -1302,7 +1318,9 @@ static int atk_probe_if(struct atk_data *data) | |||
1302 | * analysis of multiple DSDTs indicates that when both interfaces | 1318 | * analysis of multiple DSDTs indicates that when both interfaces |
1303 | * are present the new one (GGRP/GITM) is not functional. | 1319 | * are present the new one (GGRP/GITM) is not functional. |
1304 | */ | 1320 | */ |
1305 | if (data->rtmp_handle && data->rvlt_handle && data->rfan_handle) | 1321 | if (new_if) |
1322 | dev_info(dev, "Overriding interface detection\n"); | ||
1323 | if (data->rtmp_handle && data->rvlt_handle && data->rfan_handle && !new_if) | ||
1306 | data->old_interface = true; | 1324 | data->old_interface = true; |
1307 | else if (data->enumerate_handle && data->read_handle && | 1325 | else if (data->enumerate_handle && data->read_handle && |
1308 | data->write_handle) | 1326 | data->write_handle) |
@@ -1420,6 +1438,9 @@ static int __init atk0110_init(void) | |||
1420 | return -EBUSY; | 1438 | return -EBUSY; |
1421 | } | 1439 | } |
1422 | 1440 | ||
1441 | if (dmi_check_system(atk_force_new_if)) | ||
1442 | new_if = true; | ||
1443 | |||
1423 | ret = acpi_bus_register_driver(&atk_driver); | 1444 | ret = acpi_bus_register_driver(&atk_driver); |
1424 | if (ret) | 1445 | if (ret) |
1425 | pr_info("acpi_bus_register_driver failed: %d\n", ret); | 1446 | pr_info("acpi_bus_register_driver failed: %d\n", ret); |