History

acer-wmi: support Lenovo ideapad S205 wifi switch

The AMW0 function in acer-wmi works on Lenovo ideapad S205 for control the wifi hardware state. We also found there have a 0x78 EC register exposes the state of wifi hardware switch on the machine. So, add this patch to support Lenovo ideapad S205 wifi hardware switch in acer-wmi driver. Reference: bko#37892 https://bugzilla.kernel.org/show_bug.cgi?id=37892

Lee, Chun-Yi committed 15 years ago

Commit 15b956a1 parent 2c3422d1 file · +26 −2Browse files

Unified · Split

drivers/platform/x86/acer-wmi.c+26−2
@@ -305,6 +305,10 @@ static struct quirk_entry quirk_fujitsu_amilo_li_1718 = { · 304 unmodified lines
305 .wireless = 2,305 .wireless = 2,
306};306};
307 307
308static struct quirk_entry quirk_lenovo_ideapad_s205 = {
309 .wireless = 3,
310};
311
308/* The Aspire One has a dummy ACPI-WMI interface - disable it */312/* The Aspire One has a dummy ACPI-WMI interface - disable it */
309static struct dmi_system_id __devinitdata acer_blacklist[] = {313static struct dmi_system_id __devinitdata acer_blacklist[] = {
310 {314 {
@@ -451,6 +455,15 @@ static struct dmi_system_id acer_quirks[] = { · 140 unmodified lines
451 },455 },
452 .driver_data = &quirk_medion_md_98300,456 .driver_data = &quirk_medion_md_98300,
453 },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 },
454 {}467 {}
455};468};
456 469
@@ -543,6 +556,12 @@ struct wmi_interface *iface) · 86 unmodified lines
543 return AE_ERROR;556 return AE_ERROR;
544 *value = result & 0x1;557 *value = result & 0x1;
545 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;
546 default:565 default:
547 err = ec_read(0xA, &result);566 err = ec_read(0xA, &result);
548 if (err)567 if (err)
@@ -1267,8 +1286,13 @@ static void acer_rfkill_update(struct work_struct *ignored) · 718 unmodified lines
1267 acpi_status status;1286 acpi_status status;
1268 1287
1269 status = get_u32(&state, ACER_CAP_WIRELESS);1288 status = get_u32(&state, ACER_CAP_WIRELESS);
1270 if (ACPI_SUCCESS(status))1289 if (ACPI_SUCCESS(status)) {
1271 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 }
1272 1296
1273 if (has_cap(ACER_CAP_BLUETOOTH)) {1297 if (has_cap(ACER_CAP_BLUETOOTH)) {
1274 status = get_u32(&state, ACER_CAP_BLUETOOTH);1298 status = get_u32(&state, ACER_CAP_BLUETOOTH);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t