Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319672
b: refs/heads/master
c: d2044c5
h: refs/heads/master
v: v3
  • Loading branch information
AceLan Kao authored and Matthew Garrett committed Jul 28, 2012
1 parent 167d916 commit 251cdf1
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 4 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: 0ece8d515c264078a144bc597d0ffc40645ce378
refs/heads/master: d2044c5a3aafac552d28c1add16930821c24cbd0
104 changes: 101 additions & 3 deletions trunk/drivers/platform/x86/asus-nb-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <linux/input.h>
#include <linux/input/sparse-keymap.h>
#include <linux/fb.h>
#include <linux/dmi.h>

#include "asus-wmi.h"

Expand All @@ -48,18 +49,115 @@ MODULE_ALIAS("wmi:"ASUS_NB_WMI_EVENT_GUID);
* 1 | Hardware | Software
* 4 | Software | Software
*/
static uint wapf;
static int wapf = -1;
module_param(wapf, uint, 0444);
MODULE_PARM_DESC(wapf, "WAPF value");

static struct quirk_entry *quirks;

static struct quirk_entry quirk_asus_unknown = {
.wapf = 0,
};

static struct quirk_entry quirk_asus_x401u = {
.wapf = 4,
};

static int dmi_matched(const struct dmi_system_id *dmi)
{
quirks = dmi->driver_data;
return 1;
}

static struct dmi_system_id asus_quirks[] = {
{
.callback = dmi_matched,
.ident = "ASUSTeK COMPUTER INC. X401U",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_MATCH(DMI_PRODUCT_NAME, "X401U"),
},
.driver_data = &quirk_asus_x401u,
},
{
.callback = dmi_matched,
.ident = "ASUSTeK COMPUTER INC. X401A1",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_MATCH(DMI_PRODUCT_NAME, "X401A1"),
},
.driver_data = &quirk_asus_x401u,
},
{
.callback = dmi_matched,
.ident = "ASUSTeK COMPUTER INC. X501U",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_MATCH(DMI_PRODUCT_NAME, "X501U"),
},
.driver_data = &quirk_asus_x401u,
},
{
.callback = dmi_matched,
.ident = "ASUSTeK COMPUTER INC. X501A1",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_MATCH(DMI_PRODUCT_NAME, "X501A1"),
},
.driver_data = &quirk_asus_x401u,
},
{
.callback = dmi_matched,
.ident = "ASUSTeK COMPUTER INC. X55A",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_MATCH(DMI_PRODUCT_NAME, "X55A"),
},
.driver_data = &quirk_asus_x401u,
},
{
.callback = dmi_matched,
.ident = "ASUSTeK COMPUTER INC. X55C",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_MATCH(DMI_PRODUCT_NAME, "X55C"),
},
.driver_data = &quirk_asus_x401u,
},
{
.callback = dmi_matched,
.ident = "ASUSTeK COMPUTER INC. X55U",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_MATCH(DMI_PRODUCT_NAME, "X55U"),
},
.driver_data = &quirk_asus_x401u,
},
{
.callback = dmi_matched,
.ident = "ASUSTeK COMPUTER INC. X55VD",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_MATCH(DMI_PRODUCT_NAME, "X55VD"),
},
.driver_data = &quirk_asus_x401u,
},
{},
};

static void asus_nb_wmi_quirks(struct asus_wmi_driver *driver)
{
driver->quirks = &quirk_asus_unknown;
driver->quirks->wapf = wapf;
quirks = &quirk_asus_unknown;
dmi_check_system(asus_quirks);

driver->quirks = quirks;
driver->panel_power = FB_BLANK_UNBLANK;

/* overwrite the wapf setting if the wapf paramater is specified */
if (wapf != -1)
quirks->wapf = wapf;
else
wapf = quirks->wapf;
}

static const struct key_entry asus_nb_wmi_keymap[] = {
Expand Down

0 comments on commit 251cdf1

Please sign in to comment.