提交 abec04db 编写于 作者: A Andy Ross 提交者: Matthew Garrett

asus-laptop: allow boot time control of Pegatron ALS sensor

Signed-off-by: NAndy Ross <andy.ross@windriver.com>
Signed-off-by: NCorentin Chary <corentin.chary@gmail.com>
Signed-off-by: NMatthew Garrett <mjg@redhat.com>
上级 7500eeb0
...@@ -85,6 +85,7 @@ static int wlan_status = 1; ...@@ -85,6 +85,7 @@ static int wlan_status = 1;
static int bluetooth_status = 1; static int bluetooth_status = 1;
static int wimax_status = -1; static int wimax_status = -1;
static int wwan_status = -1; static int wwan_status = -1;
static int als_status;
module_param(wlan_status, int, 0444); module_param(wlan_status, int, 0444);
MODULE_PARM_DESC(wlan_status, "Set the wireless status on boot " 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 " ...@@ -106,6 +107,11 @@ MODULE_PARM_DESC(wwan_status, "Set the wireless status on boot "
"(0 = disabled, 1 = enabled, -1 = don't do anything). " "(0 = disabled, 1 = enabled, -1 = don't do anything). "
"default is 1"); "default is 1");
module_param(als_status, int, 0444);
MODULE_PARM_DESC(als_status, "Set the ALS status on boot "
"(0 = disabled, 1 = enabled). "
"default is 0");
/* /*
* Some events we use, same for all Asus * Some events we use, same for all Asus
*/ */
...@@ -1472,7 +1478,7 @@ static int __devinit asus_acpi_init(struct asus_laptop *asus) ...@@ -1472,7 +1478,7 @@ static int __devinit asus_acpi_init(struct asus_laptop *asus)
asus->ledd_status = 0xFFF; asus->ledd_status = 0xFFF;
/* Set initial values of light sensor and level */ /* Set initial values of light sensor and level */
asus->light_switch = 0; /* Default to light sensor disabled */ asus->light_switch = !!als_status;
asus->light_level = 5; /* level 5 for sensor sensitivity */ asus->light_level = 5; /* level 5 for sensor sensitivity */
if (asus->is_pega_lucid) { if (asus->is_pega_lucid) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册