aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/acer-wmi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform/x86/acer-wmi.c')
-rw-r--r--drivers/platform/x86/acer-wmi.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index 937ddeb0e977..cb7e841582d9 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -177,6 +177,11 @@ struct hotkey_function_type_aa {
177 u8 length; 177 u8 length;
178 u16 handle; 178 u16 handle;
179 u16 commun_func_bitmap; 179 u16 commun_func_bitmap;
180 u16 application_func_bitmap;
181 u16 media_func_bitmap;
182 u16 display_func_bitmap;
183 u16 others_func_bitmap;
184 u8 commun_fn_key_number;
180} __attribute__((packed)); 185} __attribute__((packed));
181 186
182/* 187/*
@@ -213,6 +218,7 @@ static int force_series;
213static bool ec_raw_mode; 218static bool ec_raw_mode;
214static bool has_type_aa; 219static bool has_type_aa;
215static u16 commun_func_bitmap; 220static u16 commun_func_bitmap;
221static u8 commun_fn_key_number;
216 222
217module_param(mailled, int, 0444); 223module_param(mailled, int, 0444);
218module_param(brightness, int, 0444); 224module_param(brightness, int, 0444);
@@ -918,7 +924,7 @@ static acpi_status wmid3_get_device_status(u32 *value, u16 device)
918 union acpi_object *obj; 924 union acpi_object *obj;
919 struct wmid3_gds_input_param params = { 925 struct wmid3_gds_input_param params = {
920 .function_num = 0x1, 926 .function_num = 0x1,
921 .hotkey_number = 0x01, 927 .hotkey_number = commun_fn_key_number,
922 .devices = device, 928 .devices = device,
923 }; 929 };
924 struct acpi_buffer input = { 930 struct acpi_buffer input = {
@@ -987,7 +993,7 @@ static acpi_status wmid3_set_device_status(u32 value, u16 device)
987 u16 devices; 993 u16 devices;
988 struct wmid3_gds_input_param params = { 994 struct wmid3_gds_input_param params = {
989 .function_num = 0x1, 995 .function_num = 0x1,
990 .hotkey_number = 0x01, 996 .hotkey_number = commun_fn_key_number,
991 .devices = commun_func_bitmap, 997 .devices = commun_func_bitmap,
992 }; 998 };
993 struct acpi_buffer input = { 999 struct acpi_buffer input = {
@@ -1027,7 +1033,7 @@ static acpi_status wmid3_set_device_status(u32 value, u16 device)
1027 1033
1028 devices = return_value.devices; 1034 devices = return_value.devices;
1029 params.function_num = 0x2; 1035 params.function_num = 0x2;
1030 params.hotkey_number = 0x01; 1036 params.hotkey_number = commun_fn_key_number;
1031 params.devices = (value) ? (devices | device) : (devices & ~device); 1037 params.devices = (value) ? (devices | device) : (devices & ~device);
1032 1038
1033 status = wmi_evaluate_method(WMID_GUID3, 0, 0x1, &input, &output2); 1039 status = wmi_evaluate_method(WMID_GUID3, 0, 0x1, &input, &output2);
@@ -1100,6 +1106,8 @@ static void type_aa_dmi_decode(const struct dmi_header *header, void *dummy)
1100 interface->capability |= ACER_CAP_THREEG; 1106 interface->capability |= ACER_CAP_THREEG;
1101 if (type_aa->commun_func_bitmap & ACER_WMID3_GDS_BLUETOOTH) 1107 if (type_aa->commun_func_bitmap & ACER_WMID3_GDS_BLUETOOTH)
1102 interface->capability |= ACER_CAP_BLUETOOTH; 1108 interface->capability |= ACER_CAP_BLUETOOTH;
1109
1110 commun_fn_key_number = type_aa->commun_fn_key_number;
1103} 1111}
1104 1112
1105static acpi_status WMID_set_capabilities(void) 1113static acpi_status WMID_set_capabilities(void)