diff options
Diffstat (limited to 'drivers/platform/x86/acer-wmi.c')
-rw-r--r-- | drivers/platform/x86/acer-wmi.c | 40 |
1 files changed, 36 insertions, 4 deletions
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index e1c4938b301b..af2bb20cb2fb 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c | |||
@@ -99,6 +99,7 @@ enum acer_wmi_event_ids { | |||
99 | static const struct key_entry acer_wmi_keymap[] = { | 99 | static const struct key_entry acer_wmi_keymap[] = { |
100 | {KE_KEY, 0x01, {KEY_WLAN} }, /* WiFi */ | 100 | {KE_KEY, 0x01, {KEY_WLAN} }, /* WiFi */ |
101 | {KE_KEY, 0x03, {KEY_WLAN} }, /* WiFi */ | 101 | {KE_KEY, 0x03, {KEY_WLAN} }, /* WiFi */ |
102 | {KE_KEY, 0x04, {KEY_WLAN} }, /* WiFi */ | ||
102 | {KE_KEY, 0x12, {KEY_BLUETOOTH} }, /* BT */ | 103 | {KE_KEY, 0x12, {KEY_BLUETOOTH} }, /* BT */ |
103 | {KE_KEY, 0x21, {KEY_PROG1} }, /* Backup */ | 104 | {KE_KEY, 0x21, {KEY_PROG1} }, /* Backup */ |
104 | {KE_KEY, 0x22, {KEY_PROG2} }, /* Arcade */ | 105 | {KE_KEY, 0x22, {KEY_PROG2} }, /* Arcade */ |
@@ -304,6 +305,10 @@ static struct quirk_entry quirk_fujitsu_amilo_li_1718 = { | |||
304 | .wireless = 2, | 305 | .wireless = 2, |
305 | }; | 306 | }; |
306 | 307 | ||
308 | static struct quirk_entry quirk_lenovo_ideapad_s205 = { | ||
309 | .wireless = 3, | ||
310 | }; | ||
311 | |||
307 | /* The Aspire One has a dummy ACPI-WMI interface - disable it */ | 312 | /* The Aspire One has a dummy ACPI-WMI interface - disable it */ |
308 | static struct dmi_system_id __devinitdata acer_blacklist[] = { | 313 | static struct dmi_system_id __devinitdata acer_blacklist[] = { |
309 | { | 314 | { |
@@ -450,6 +455,15 @@ static struct dmi_system_id acer_quirks[] = { | |||
450 | }, | 455 | }, |
451 | .driver_data = &quirk_medion_md_98300, | 456 | .driver_data = &quirk_medion_md_98300, |
452 | }, | 457 | }, |
458 | { | ||
459 | .callback = dmi_matched, | ||
460 | .ident = "Lenovo Ideapad S205", | ||
461 | .matches = { | ||
462 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | ||
463 | DMI_MATCH(DMI_PRODUCT_NAME, "10382LG"), | ||
464 | }, | ||
465 | .driver_data = &quirk_lenovo_ideapad_s205, | ||
466 | }, | ||
453 | {} | 467 | {} |
454 | }; | 468 | }; |
455 | 469 | ||
@@ -542,6 +556,12 @@ struct wmi_interface *iface) | |||
542 | return AE_ERROR; | 556 | return AE_ERROR; |
543 | *value = result & 0x1; | 557 | *value = result & 0x1; |
544 | return AE_OK; | 558 | return AE_OK; |
559 | case 3: | ||
560 | err = ec_read(0x78, &result); | ||
561 | if (err) | ||
562 | return AE_ERROR; | ||
563 | *value = result & 0x1; | ||
564 | return AE_OK; | ||
545 | default: | 565 | default: |
546 | err = ec_read(0xA, &result); | 566 | err = ec_read(0xA, &result); |
547 | if (err) | 567 | if (err) |
@@ -1266,8 +1286,13 @@ static void acer_rfkill_update(struct work_struct *ignored) | |||
1266 | acpi_status status; | 1286 | acpi_status status; |
1267 | 1287 | ||
1268 | status = get_u32(&state, ACER_CAP_WIRELESS); | 1288 | status = get_u32(&state, ACER_CAP_WIRELESS); |
1269 | if (ACPI_SUCCESS(status)) | 1289 | if (ACPI_SUCCESS(status)) { |
1270 | rfkill_set_sw_state(wireless_rfkill, !state); | 1290 | if (quirks->wireless == 3) { |
1291 | rfkill_set_hw_state(wireless_rfkill, !state); | ||
1292 | } else { | ||
1293 | rfkill_set_sw_state(wireless_rfkill, !state); | ||
1294 | } | ||
1295 | } | ||
1271 | 1296 | ||
1272 | if (has_cap(ACER_CAP_BLUETOOTH)) { | 1297 | if (has_cap(ACER_CAP_BLUETOOTH)) { |
1273 | status = get_u32(&state, ACER_CAP_BLUETOOTH); | 1298 | status = get_u32(&state, ACER_CAP_BLUETOOTH); |
@@ -1400,6 +1425,9 @@ static ssize_t show_bool_threeg(struct device *dev, | |||
1400 | { | 1425 | { |
1401 | u32 result; \ | 1426 | u32 result; \ |
1402 | acpi_status status; | 1427 | acpi_status status; |
1428 | |||
1429 | pr_info("This threeg sysfs will be removed in 2012" | ||
1430 | " - used by: %s\n", current->comm); | ||
1403 | if (wmi_has_guid(WMID_GUID3)) | 1431 | if (wmi_has_guid(WMID_GUID3)) |
1404 | status = wmid3_get_device_status(&result, | 1432 | status = wmid3_get_device_status(&result, |
1405 | ACER_WMID3_GDS_THREEG); | 1433 | ACER_WMID3_GDS_THREEG); |
@@ -1415,8 +1443,10 @@ static ssize_t set_bool_threeg(struct device *dev, | |||
1415 | { | 1443 | { |
1416 | u32 tmp = simple_strtoul(buf, NULL, 10); | 1444 | u32 tmp = simple_strtoul(buf, NULL, 10); |
1417 | acpi_status status = set_u32(tmp, ACER_CAP_THREEG); | 1445 | acpi_status status = set_u32(tmp, ACER_CAP_THREEG); |
1418 | if (ACPI_FAILURE(status)) | 1446 | pr_info("This threeg sysfs will be removed in 2012" |
1419 | return -EINVAL; | 1447 | " - used by: %s\n", current->comm); |
1448 | if (ACPI_FAILURE(status)) | ||
1449 | return -EINVAL; | ||
1420 | return count; | 1450 | return count; |
1421 | } | 1451 | } |
1422 | static DEVICE_ATTR(threeg, S_IRUGO | S_IWUSR, show_bool_threeg, | 1452 | static DEVICE_ATTR(threeg, S_IRUGO | S_IWUSR, show_bool_threeg, |
@@ -1425,6 +1455,8 @@ static DEVICE_ATTR(threeg, S_IRUGO | S_IWUSR, show_bool_threeg, | |||
1425 | static ssize_t show_interface(struct device *dev, struct device_attribute *attr, | 1455 | static ssize_t show_interface(struct device *dev, struct device_attribute *attr, |
1426 | char *buf) | 1456 | char *buf) |
1427 | { | 1457 | { |
1458 | pr_info("This interface sysfs will be removed in 2012" | ||
1459 | " - used by: %s\n", current->comm); | ||
1428 | switch (interface->type) { | 1460 | switch (interface->type) { |
1429 | case ACER_AMW0: | 1461 | case ACER_AMW0: |
1430 | return sprintf(buf, "AMW0\n"); | 1462 | return sprintf(buf, "AMW0\n"); |