Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 243108
b: refs/heads/master
c: 46dbca8
h: refs/heads/master
v: v3
  • Loading branch information
Corentin Chary authored and Matthew Garrett committed Mar 28, 2011
1 parent 7607a1f commit 9dbac76
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8fbea019a1a70e0fb01e0f98c963e6042fbe94ab
refs/heads/master: 46dbca871df753ce92c321a41a8a38eba7487680
28 changes: 28 additions & 0 deletions trunk/drivers/platform/x86/asus-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,13 @@ MODULE_LICENSE("GPL");
#define NOTIFY_BRNDOWN_MAX 0x2e

/* WMI Methods */
#define ASUS_WMI_METHODID_SPEC 0x43455053
#define ASUS_WMI_METHODID_SFUN 0x4E554653
#define ASUS_WMI_METHODID_DSTS 0x53544344
#define ASUS_WMI_METHODID_DSTS2 0x53545344
#define ASUS_WMI_METHODID_DEVS 0x53564544
#define ASUS_WMI_METHODID_CFVS 0x53564643
#define ASUS_WMI_METHODID_INIT 0x54494E49

#define ASUS_WMI_UNSUPPORTED_METHOD 0xFFFFFFFE

Expand Down Expand Up @@ -126,6 +129,8 @@ struct asus_rfkill {

struct asus_wmi {
int dsts_id;
int spec;
int sfun;

struct input_dev *inputdev;
struct backlight_device *backlight_device;
Expand Down Expand Up @@ -1065,6 +1070,29 @@ static int asus_wmi_sysfs_init(struct platform_device *device)
*/
static int __init asus_wmi_platform_init(struct asus_wmi *asus)
{
int rv;

/* INIT enable hotkeys on some models */
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_INIT, 0, 0, &rv))
pr_info("Initialization: %#x", rv);

/* We don't know yet what to do with this version... */
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_SPEC, 0, 0x9, &rv)) {
pr_info("BIOS WMI version: %d.%d", rv >> 8, rv & 0xFF);
asus->spec = rv;
}

/*
* The SFUN method probably allows the original driver to get the list
* of features supported by a given model. For now, 0x0100 or 0x0800
* bit signifies that the laptop is equipped with a Wi-Fi MiniPCI card.
* The significance of others is yet to be found.
*/
if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_SFUN, 0, 0, &rv)) {
pr_info("SFUN value: %#x", rv);
asus->sfun = rv;
}

/*
* Eee PC and Notebooks seems to have different method_id for DSTS,
* but it may also be related to the BIOS's SPEC.
Expand Down

0 comments on commit 9dbac76

Please sign in to comment.