Skip to content

Commit abec04d

Browse files
Andy RossMatthew Garrett
authored andcommitted
asus-laptop: allow boot time control of Pegatron ALS sensor
Signed-off-by: Andy Ross <[email protected]> Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
1 parent 7500eeb commit abec04d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

drivers/platform/x86/asus-laptop.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ static int wlan_status = 1;
8585
static int bluetooth_status = 1;
8686
static int wimax_status = -1;
8787
static int wwan_status = -1;
88+
static int als_status;
8889

8990
module_param(wlan_status, int, 0444);
9091
MODULE_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 "
106107
"(0 = disabled, 1 = enabled, -1 = don't do anything). "
107108
"default is 1");
108109

110+
module_param(als_status, int, 0444);
111+
MODULE_PARM_DESC(als_status, "Set the ALS status on boot "
112+
"(0 = disabled, 1 = enabled). "
113+
"default is 0");
114+
109115
/*
110116
* Some events we use, same for all Asus
111117
*/
@@ -1472,7 +1478,7 @@ static int __devinit asus_acpi_init(struct asus_laptop *asus)
14721478
asus->ledd_status = 0xFFF;
14731479

14741480
/* Set initial values of light sensor and level */
1475-
asus->light_switch = 0; /* Default to light sensor disabled */
1481+
asus->light_switch = !!als_status;
14761482
asus->light_level = 5; /* level 5 for sensor sensitivity */
14771483

14781484
if (asus->is_pega_lucid) {

0 commit comments

Comments
 (0)