aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorentin Chary <corentincj@iksaif.net>2007-03-11 05:27:33 -0400
committerLen Brown <len.brown@intel.com>2007-03-11 15:44:59 -0400
commit185e5af98b1e09b1e0f859332243223776b2ad57 (patch)
tree042356f6780e97ac1228f218e09daba7d3246cea
parentfdd8d08084663242b42e27f7d71739f3f9009286 (diff)
asus-laptop: add wapf param
Add the "wapf" param. This param allows to define the behavior of the Fn F2 key (wlan switch). Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r--drivers/misc/asus-laptop.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/misc/asus-laptop.c b/drivers/misc/asus-laptop.c
index 475709b8d391..d75e4479a821 100644
--- a/drivers/misc/asus-laptop.c
+++ b/drivers/misc/asus-laptop.c
@@ -95,6 +95,19 @@ MODULE_AUTHOR("Julien Lerouge, Karol Kozimor, Corentin Chary");
95MODULE_DESCRIPTION(ASUS_HOTK_NAME); 95MODULE_DESCRIPTION(ASUS_HOTK_NAME);
96MODULE_LICENSE("GPL"); 96MODULE_LICENSE("GPL");
97 97
98/* WAPF defines the behavior of the Fn+Fx wlan key
99 * The significance of values is yet to be found, but
100 * most of the time:
101 * 0x0 will do nothing
102 * 0x1 will allow to control the device with Fn+Fx key.
103 * 0x4 will send an ACPI event (0x88) while pressing the Fn+Fx key
104 * 0x5 like 0x1 or 0x4
105 * So, if something doesn't work as you want, just try other values =)
106 */
107static uint wapf = 1;
108module_param(wapf, uint, 0644);
109MODULE_PARM_DESC(wapf, "WAPF value");
110
98#define ASUS_HANDLE(object, paths...) \ 111#define ASUS_HANDLE(object, paths...) \
99 static acpi_handle object##_handle = NULL; \ 112 static acpi_handle object##_handle = NULL; \
100 static char *object##_paths[] = { paths } 113 static char *object##_paths[] = { paths }
@@ -811,6 +824,9 @@ static int asus_hotk_get_info(void)
811 printk(ASUS_NOTICE "BSTS called, 0x%02x returned\n", 824 printk(ASUS_NOTICE "BSTS called, 0x%02x returned\n",
812 (uint) bsts_result); 825 (uint) bsts_result);
813 826
827 /* This too ... */
828 write_acpi_int(hotk->handle, "CWAP", wapf, NULL);
829
814 /* 830 /*
815 * Try to match the object returned by INIT to the specific model. 831 * Try to match the object returned by INIT to the specific model.
816 * Handle every possible object (or the lack of thereof) the DSDT 832 * Handle every possible object (or the lack of thereof) the DSDT