aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorCorentin Chary <corentincj@iksaif.net>2009-08-28 08:56:41 -0400
committerLen Brown <len.brown@intel.com>2009-08-28 15:21:12 -0400
commitd1ec9c3d434d94e3674bcf433e8e8e7462b8e1c0 (patch)
tree7dbdc81e3a1f84c7b22d797c6d3b9bc5cce99ce7 /drivers/platform
parentc200da5d2900df9c24fb8041870d92a4175bbef3 (diff)
eeepc-laptop: add rfkill support for the Wimax in ASUS Eee PC 1000HG
Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/eeepc-laptop.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c
index 1c948604af94..c9febf4b1faa 100644
--- a/drivers/platform/x86/eeepc-laptop.c
+++ b/drivers/platform/x86/eeepc-laptop.c
@@ -142,6 +142,7 @@ struct eeepc_hotk {
142 struct rfkill *wlan_rfkill; 142 struct rfkill *wlan_rfkill;
143 struct rfkill *bluetooth_rfkill; 143 struct rfkill *bluetooth_rfkill;
144 struct rfkill *wwan3g_rfkill; 144 struct rfkill *wwan3g_rfkill;
145 struct rfkill *wimax_rfkill;
145 struct hotplug_slot *hotplug_slot; 146 struct hotplug_slot *hotplug_slot;
146 struct mutex hotplug_lock; 147 struct mutex hotplug_lock;
147}; 148};
@@ -857,6 +858,9 @@ static int eeepc_hotk_restore(struct device *device)
857 if (ehotk->wwan3g_rfkill) 858 if (ehotk->wwan3g_rfkill)
858 rfkill_set_sw_state(ehotk->wwan3g_rfkill, 859 rfkill_set_sw_state(ehotk->wwan3g_rfkill,
859 get_acpi(CM_ASL_3G) != 1); 860 get_acpi(CM_ASL_3G) != 1);
861 if (ehotk->wimax_rfkill)
862 rfkill_set_sw_state(ehotk->wimax_rfkill,
863 get_acpi(CM_ASL_WIMAX) != 1);
860 864
861 return 0; 865 return 0;
862} 866}
@@ -995,6 +999,8 @@ static void eeepc_rfkill_exit(void)
995 rfkill_unregister(ehotk->bluetooth_rfkill); 999 rfkill_unregister(ehotk->bluetooth_rfkill);
996 if (ehotk->wwan3g_rfkill) 1000 if (ehotk->wwan3g_rfkill)
997 rfkill_unregister(ehotk->wwan3g_rfkill); 1001 rfkill_unregister(ehotk->wwan3g_rfkill);
1002 if (ehotk->wimax_rfkill)
1003 rfkill_unregister(ehotk->wimax_rfkill);
998} 1004}
999 1005
1000static void eeepc_input_exit(void) 1006static void eeepc_input_exit(void)
@@ -1070,6 +1076,13 @@ static int eeepc_rfkill_init(struct device *dev)
1070 if (result && result != -ENODEV) 1076 if (result && result != -ENODEV)
1071 goto exit; 1077 goto exit;
1072 1078
1079 result = eeepc_new_rfkill(&ehotk->wimax_rfkill,
1080 "eeepc-wimax", dev,
1081 RFKILL_TYPE_WIMAX, CM_ASL_WIMAX);
1082
1083 if (result && result != -ENODEV)
1084 goto exit;
1085
1073 result = eeepc_setup_pci_hotplug(); 1086 result = eeepc_setup_pci_hotplug();
1074 /* 1087 /*
1075 * If we get -EBUSY then something else is handling the PCI hotplug - 1088 * If we get -EBUSY then something else is handling the PCI hotplug -