aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorentin Chary <corentincj@iksaif.net>2011-02-26 04:20:38 -0500
committerMatthew Garrett <mjg@redhat.com>2011-03-28 06:07:22 -0400
commit46dbca871df753ce92c321a41a8a38eba7487680 (patch)
tree8bc5db37db2aeb8a446554ecd4b9830e909b368b
parent8fbea019a1a70e0fb01e0f98c963e6042fbe94ab (diff)
asus-wmi: add calls to INIT, SPEC and SFUN on init
INIT() call is needed to enable hotkeys on G73 SPEC() and SFUN() allow us to know more about available features. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
-rw-r--r--drivers/platform/x86/asus-wmi.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index adf7b05c9aef..88596ea0f74e 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -66,10 +66,13 @@ MODULE_LICENSE("GPL");
66#define NOTIFY_BRNDOWN_MAX 0x2e 66#define NOTIFY_BRNDOWN_MAX 0x2e
67 67
68/* WMI Methods */ 68/* WMI Methods */
69#define ASUS_WMI_METHODID_SPEC 0x43455053
70#define ASUS_WMI_METHODID_SFUN 0x4E554653
69#define ASUS_WMI_METHODID_DSTS 0x53544344 71#define ASUS_WMI_METHODID_DSTS 0x53544344
70#define ASUS_WMI_METHODID_DSTS2 0x53545344 72#define ASUS_WMI_METHODID_DSTS2 0x53545344
71#define ASUS_WMI_METHODID_DEVS 0x53564544 73#define ASUS_WMI_METHODID_DEVS 0x53564544
72#define ASUS_WMI_METHODID_CFVS 0x53564643 74#define ASUS_WMI_METHODID_CFVS 0x53564643
75#define ASUS_WMI_METHODID_INIT 0x54494E49
73 76
74#define ASUS_WMI_UNSUPPORTED_METHOD 0xFFFFFFFE 77#define ASUS_WMI_UNSUPPORTED_METHOD 0xFFFFFFFE
75 78
@@ -126,6 +129,8 @@ struct asus_rfkill {
126 129
127struct asus_wmi { 130struct asus_wmi {
128 int dsts_id; 131 int dsts_id;
132 int spec;
133 int sfun;
129 134
130 struct input_dev *inputdev; 135 struct input_dev *inputdev;
131 struct backlight_device *backlight_device; 136 struct backlight_device *backlight_device;
@@ -1065,6 +1070,29 @@ static int asus_wmi_sysfs_init(struct platform_device *device)
1065 */ 1070 */
1066static int __init asus_wmi_platform_init(struct asus_wmi *asus) 1071static int __init asus_wmi_platform_init(struct asus_wmi *asus)
1067{ 1072{
1073 int rv;
1074
1075 /* INIT enable hotkeys on some models */
1076 if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_INIT, 0, 0, &rv))
1077 pr_info("Initialization: %#x", rv);
1078
1079 /* We don't know yet what to do with this version... */
1080 if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_SPEC, 0, 0x9, &rv)) {
1081 pr_info("BIOS WMI version: %d.%d", rv >> 8, rv & 0xFF);
1082 asus->spec = rv;
1083 }
1084
1085 /*
1086 * The SFUN method probably allows the original driver to get the list
1087 * of features supported by a given model. For now, 0x0100 or 0x0800
1088 * bit signifies that the laptop is equipped with a Wi-Fi MiniPCI card.
1089 * The significance of others is yet to be found.
1090 */
1091 if (!asus_wmi_evaluate_method(ASUS_WMI_METHODID_SFUN, 0, 0, &rv)) {
1092 pr_info("SFUN value: %#x", rv);
1093 asus->sfun = rv;
1094 }
1095
1068 /* 1096 /*
1069 * Eee PC and Notebooks seems to have different method_id for DSTS, 1097 * Eee PC and Notebooks seems to have different method_id for DSTS,
1070 * but it may also be related to the BIOS's SPEC. 1098 * but it may also be related to the BIOS's SPEC.