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
305305 .wireless = 2,
306306 };
307307
308+static struct quirk_entry quirk_lenovo_ideapad_s205 = {
309+ .wireless = 3,
310+};
311+
308312 /* The Aspire One has a dummy ACPI-WMI interface - disable it */
309313 static struct dmi_system_id __devinitdata acer_blacklist[] = {
310314 {
@@ -451,6 +455,15 @@ static struct dmi_system_id acer_quirks[] = { · 140 unmodified lines
451455 },
452456 .driver_data = &quirk_medion_md_98300,
453457 },
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+ },
454467 {}
455468 };
456469
@@ -543,6 +556,12 @@ struct wmi_interface *iface) · 86 unmodified lines
543556 return AE_ERROR;
544557 *value = result & 0x1;
545558 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;
546565 default:
547566 err = ec_read(0xA, &result);
548567 if (err)
@@ -1267,8 +1286,13 @@ static void acer_rfkill_update(struct work_struct *ignored) · 718 unmodified lines
12671286 acpi_status status;
12681287
12691288 status = get_u32(&state, ACER_CAP_WIRELESS);
1270− if (ACPI_SUCCESS(status))
1271− rfkill_set_sw_state(wireless_rfkill, !state);
1289+ if (ACPI_SUCCESS(status)) {
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+ }
12721296
12731297 if (has_cap(ACER_CAP_BLUETOOTH)) {
12741298 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