aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/asus_atk0110.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/asus_atk0110.c')
-rw-r--r--drivers/hwmon/asus_atk0110.c23
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
26static bool new_if;
27module_param(new_if, bool, 0);
28MODULE_PARM_DESC(new_if, "Override detection heuristic and force the use of the new ATK0110 interface");
29
30static 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);