aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAndy Ross <andy.ross@windriver.com>2011-10-14 05:13:37 -0400
committerMatthew Garrett <mjg@redhat.com>2011-10-24 10:52:40 -0400
commitabec04dbc3dbe7577ccd9d5d6e188aa153d464eb (patch)
treea4a0dac24695c0bbc2507d39f87a83598c6f9c06 /drivers
parent7500eeb08a179e61a4219288c21407d63d1e9c64 (diff)
asus-laptop: allow boot time control of Pegatron ALS sensor
Signed-off-by: Andy Ross <andy.ross@windriver.com> Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/platform/x86/asus-laptop.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index 10b0a8663bb..8327d06b6e8 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -85,6 +85,7 @@ static int wlan_status = 1;
85static int bluetooth_status = 1; 85static int bluetooth_status = 1;
86static int wimax_status = -1; 86static int wimax_status = -1;
87static int wwan_status = -1; 87static int wwan_status = -1;
88static int als_status;
88 89
89module_param(wlan_status, int, 0444); 90module_param(wlan_status, int, 0444);
90MODULE_PARM_DESC(wlan_status, "Set the wireless status on boot " 91MODULE_PARM_DESC(wlan_status, "Set the wireless status on boot "
@@ -106,6 +107,11 @@ MODULE_PARM_DESC(wwan_status, "Set the wireless status on boot "
106 "(0 = disabled, 1 = enabled, -1 = don't do anything). " 107 "(0 = disabled, 1 = enabled, -1 = don't do anything). "
107 "default is 1"); 108 "default is 1");
108 109
110module_param(als_status, int, 0444);
111MODULE_PARM_DESC(als_status, "Set the ALS status on boot "
112 "(0 = disabled, 1 = enabled). "
113 "default is 0");
114
109/* 115/*
110 * Some events we use, same for all Asus 116 * Some events we use, same for all Asus
111 */ 117 */
@@ -1472,7 +1478,7 @@ static int __devinit asus_acpi_init(struct asus_laptop *asus)
1472 asus->ledd_status = 0xFFF; 1478 asus->ledd_status = 0xFFF;
1473 1479
1474 /* Set initial values of light sensor and level */ 1480 /* Set initial values of light sensor and level */
1475 asus->light_switch = 0; /* Default to light sensor disabled */ 1481 asus->light_switch = !!als_status;
1476 asus->light_level = 5; /* level 5 for sensor sensitivity */ 1482 asus->light_level = 5; /* level 5 for sensor sensitivity */
1477 1483
1478 if (asus->is_pega_lucid) { 1484 if (asus->is_pega_lucid) {