Skip to content

Commit

Permalink
Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/…
Browse files Browse the repository at this point in the history
…kernel/git/groeck/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging:
  hwmon: (lis3) turn down the no IRQ message
  hwmon: (asus_atk0110) Override interface detection on Sabertooth X58
  hwmon: (applesmc) Properly initialize lockdep attributes
  • Loading branch information
Linus Torvalds committed Jan 27, 2011
2 parents b17b849 + a20f0bc commit 0b711ca
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
1 change: 1 addition & 0 deletions drivers/hwmon/applesmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,7 @@ static int applesmc_create_nodes(struct applesmc_node_group *groups, int num)
node->sda.dev_attr.show = grp->show;
node->sda.dev_attr.store = grp->store;
attr = &node->sda.dev_attr.attr;
sysfs_attr_init(attr);
attr->name = node->name;
attr->mode = S_IRUGO | (grp->store ? S_IWUSR : 0);
ret = sysfs_create_file(&pdev->dev.kobj, attr);
Expand Down
23 changes: 22 additions & 1 deletion drivers/hwmon/asus_atk0110.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <linux/list.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/dmi.h>

#include <acpi/acpi.h>
#include <acpi/acpixf.h>
Expand All @@ -22,6 +23,21 @@

#define ATK_HID "ATK0110"

static bool new_if;
module_param(new_if, bool, 0);
MODULE_PARM_DESC(new_if, "Override detection heuristic and force the use of the new ATK0110 interface");

static const struct dmi_system_id __initconst atk_force_new_if[] = {
{
/* Old interface has broken MCH temp monitoring */
.ident = "Asus Sabertooth X58",
.matches = {
DMI_MATCH(DMI_BOARD_NAME, "SABERTOOTH X58")
}
},
{ }
};

/* Minimum time between readings, enforced in order to avoid
* hogging the CPU.
*/
Expand Down Expand Up @@ -1302,7 +1318,9 @@ static int atk_probe_if(struct atk_data *data)
* analysis of multiple DSDTs indicates that when both interfaces
* are present the new one (GGRP/GITM) is not functional.
*/
if (data->rtmp_handle && data->rvlt_handle && data->rfan_handle)
if (new_if)
dev_info(dev, "Overriding interface detection\n");
if (data->rtmp_handle && data->rvlt_handle && data->rfan_handle && !new_if)
data->old_interface = true;
else if (data->enumerate_handle && data->read_handle &&
data->write_handle)
Expand Down Expand Up @@ -1420,6 +1438,9 @@ static int __init atk0110_init(void)
return -EBUSY;
}

if (dmi_check_system(atk_force_new_if))
new_if = true;

ret = acpi_bus_register_driver(&atk_driver);
if (ret)
pr_info("acpi_bus_register_driver failed: %d\n", ret);
Expand Down
2 changes: 1 addition & 1 deletion drivers/hwmon/lis3lv02d.c
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ int lis3lv02d_init_device(struct lis3lv02d *dev)

/* bail if we did not get an IRQ from the bus layer */
if (!dev->irq) {
pr_err("No IRQ. Disabling /dev/freefall\n");
pr_debug("No IRQ. Disabling /dev/freefall\n");
goto out;
}

Expand Down

0 comments on commit 0b711ca

Please sign in to comment.