Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 101993
b: refs/heads/master
c: 9991d9f
h: refs/heads/master
i:
  101991: c9afa28
v: v3
  • Loading branch information
Carlos Corbacho authored and Andi Kleen committed Jul 16, 2008
1 parent 99bdaec commit 5a92130
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a0bbaf83311cd995136c9047f174d79c1075ee2d
refs/heads/master: 9991d9f2bc75dc8735932240b67432d4073b8f60
31 changes: 27 additions & 4 deletions trunk/drivers/misc/acer-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ static struct wmi_interface *interface;
struct quirk_entry {
u8 wireless;
u8 mailled;
u8 brightness;
s8 brightness;
u8 bluetooth;
};

Expand All @@ -198,6 +198,10 @@ static int dmi_matched(const struct dmi_system_id *dmi)
static struct quirk_entry quirk_unknown = {
};

static struct quirk_entry quirk_acer_aspire_1520 = {
.brightness = -1,
};

static struct quirk_entry quirk_acer_travelmate_2490 = {
.mailled = 1,
};
Expand All @@ -208,6 +212,24 @@ static struct quirk_entry quirk_medion_md_98300 = {
};

static struct dmi_system_id acer_quirks[] = {
{
.callback = dmi_matched,
.ident = "Acer Aspire 1360",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 1360"),
},
.driver_data = &quirk_acer_aspire_1520,
},
{
.callback = dmi_matched,
.ident = "Acer Aspire 1520",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 1520"),
},
.driver_data = &quirk_acer_aspire_1520,
},
{
.callback = dmi_matched,
.ident = "Acer Aspire 3100",
Expand Down Expand Up @@ -552,7 +574,8 @@ static acpi_status AMW0_set_capabilities(void)
* appear to use the same EC register for brightness, even if they
* differ for wireless, etc
*/
interface->capability |= ACER_CAP_BRIGHTNESS;
if (quirks->brightness >= 0)
interface->capability |= ACER_CAP_BRIGHTNESS;

return AE_OK;
}
Expand Down Expand Up @@ -1059,6 +1082,8 @@ static int __init acer_wmi_init(void)
printk(ACER_INFO "Acer Laptop ACPI-WMI Extras version %s\n",
ACER_WMI_VERSION);

find_quirks();

/*
* Detect which ACPI-WMI interface we're using.
*/
Expand Down Expand Up @@ -1092,8 +1117,6 @@ static int __init acer_wmi_init(void)
if (wmi_has_guid(AMW0_GUID1))
AMW0_find_mailled();

find_quirks();

if (!interface) {
printk(ACER_ERR "No or unsupported WMI interface, unable to "
"load\n");
Expand Down

0 comments on commit 5a92130

Please sign in to comment.