aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorCorentin Chary <corentincj@iksaif.net>2010-01-10 14:49:26 -0500
committerCorentin Chary <corentincj@iksaif.net>2010-02-28 13:35:09 -0500
commit0e875f4905817c03ba49447b49af093552e66e95 (patch)
tree7572b77fc991de156cba16793c668e0bcac3127c /drivers/platform
parentbaac35c4155a8aa826c70acee6553368ca5243a2 (diff)
asus-laptop: add wireless and bluetooth status parameter
These to parameter allow to set the status of wlan and bluetooth device when the module load. On some models, the device will always be down on boot, so the default behavior is to always enable these devices. Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/asus-laptop.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index 61a1c7503658..1d799b3fc4e8 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -113,6 +113,19 @@ static uint wapf = 1;
113module_param(wapf, uint, 0644); 113module_param(wapf, uint, 0644);
114MODULE_PARM_DESC(wapf, "WAPF value"); 114MODULE_PARM_DESC(wapf, "WAPF value");
115 115
116static uint wireless_status = 1;
117static uint bluetooth_status = 1;
118
119module_param(wireless_status, uint, 0644);
120MODULE_PARM_DESC(wireless_status, "Set the wireless status on boot "
121 "(0 = disabled, 1 = enabled, -1 = don't do anything). "
122 "default is 1");
123
124module_param(bluetooth_status, uint, 0644);
125MODULE_PARM_DESC(bluetooth_status, "Set the wireless status on boot "
126 "(0 = disabled, 1 = enabled, -1 = don't do anything). "
127 "default is 1");
128
116#define ASUS_HANDLE(object, paths...) \ 129#define ASUS_HANDLE(object, paths...) \
117 static acpi_handle object##_handle = NULL; \ 130 static acpi_handle object##_handle = NULL; \
118 static char *object##_paths[] = { paths } 131 static char *object##_paths[] = { paths }
@@ -1272,8 +1285,10 @@ static int asus_hotk_add(struct acpi_device *device)
1272 asus_hotk_found = 1; 1285 asus_hotk_found = 1;
1273 1286
1274 /* WLED and BLED are on by default */ 1287 /* WLED and BLED are on by default */
1275 write_status(bt_switch_handle, 1, BT_ON); 1288 if (bluetooth_status != -1)
1276 write_status(wl_switch_handle, 1, WL_ON); 1289 write_status(bt_switch_handle, !!bluetooth_status, BT_ON);
1290 if (wireless_status != -1)
1291 write_status(wl_switch_handle, !!wireless_status, WL_ON);
1277 1292
1278 /* If the h/w switch is off, we need to check the real status */ 1293 /* If the h/w switch is off, we need to check the real status */
1279 write_status(NULL, read_status(BT_ON), BT_ON); 1294 write_status(NULL, read_status(BT_ON), BT_ON);