diff options
author | Dave Airlie <airlied@redhat.com> | 2011-05-08 21:40:25 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-05-08 21:40:38 -0400 |
commit | 000703f44c77b152cd966eaf06f4ab043274ff46 (patch) | |
tree | c71b325073713c3089856f627442181a47d1482a /drivers/platform/x86/mxm-wmi.c | |
parent | f19467c509e36e5ba3498efd7d4072d3581a1d6c (diff) |
mxm/wmi: add MXMX interface entry point.
The MXMX method appears to be a mutex of some sort.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/platform/x86/mxm-wmi.c')
-rw-r--r-- | drivers/platform/x86/mxm-wmi.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/drivers/platform/x86/mxm-wmi.c b/drivers/platform/x86/mxm-wmi.c index 12b6f341e72b..0aea63b3729a 100644 --- a/drivers/platform/x86/mxm-wmi.c +++ b/drivers/platform/x86/mxm-wmi.c | |||
@@ -32,6 +32,7 @@ MODULE_LICENSE("GPL"); | |||
32 | MODULE_ALIAS("wmi:"MXM_WMMX_GUID); | 32 | MODULE_ALIAS("wmi:"MXM_WMMX_GUID); |
33 | 33 | ||
34 | #define MXM_WMMX_FUNC_MXDS 0x5344584D /* "MXDS" */ | 34 | #define MXM_WMMX_FUNC_MXDS 0x5344584D /* "MXDS" */ |
35 | #define MXM_WMMX_FUNC_MXMX 0x53445344 /* "MXMX" */ | ||
35 | 36 | ||
36 | struct mxds_args { | 37 | struct mxds_args { |
37 | u32 func; | 38 | u32 func; |
@@ -51,7 +52,7 @@ int mxm_wmi_call_mxds(int adapter) | |||
51 | acpi_status status; | 52 | acpi_status status; |
52 | 53 | ||
53 | printk("calling mux switch %d\n", adapter); | 54 | printk("calling mux switch %d\n", adapter); |
54 | 55 | ||
55 | status = wmi_evaluate_method(MXM_WMMX_GUID, 0x1, adapter, &input, | 56 | status = wmi_evaluate_method(MXM_WMMX_GUID, 0x1, adapter, &input, |
56 | &output); | 57 | &output); |
57 | 58 | ||
@@ -64,6 +65,31 @@ int mxm_wmi_call_mxds(int adapter) | |||
64 | } | 65 | } |
65 | EXPORT_SYMBOL_GPL(mxm_wmi_call_mxds); | 66 | EXPORT_SYMBOL_GPL(mxm_wmi_call_mxds); |
66 | 67 | ||
68 | int mxm_wmi_call_mxmx(int adapter) | ||
69 | { | ||
70 | struct mxds_args args = { | ||
71 | .func = MXM_WMMX_FUNC_MXMX, | ||
72 | .args = 0, | ||
73 | .xarg = 1, | ||
74 | }; | ||
75 | struct acpi_buffer input = { (acpi_size)sizeof(args), &args }; | ||
76 | struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL }; | ||
77 | acpi_status status; | ||
78 | |||
79 | printk("calling mux switch %d\n", adapter); | ||
80 | |||
81 | status = wmi_evaluate_method(MXM_WMMX_GUID, 0x1, adapter, &input, | ||
82 | &output); | ||
83 | |||
84 | if (ACPI_FAILURE(status)) | ||
85 | return status; | ||
86 | |||
87 | printk("mux mutex set switched %d\n", status); | ||
88 | return 0; | ||
89 | |||
90 | } | ||
91 | EXPORT_SYMBOL_GPL(mxm_wmi_call_mxmx); | ||
92 | |||
67 | bool mxm_wmi_supported(void) | 93 | bool mxm_wmi_supported(void) |
68 | { | 94 | { |
69 | bool guid_valid; | 95 | bool guid_valid; |