From: Andy Ross <andy.ross@windriver.com>
To: Corentin Chary <corentin.chary@gmail.com>
Cc: acpi4asus-user@lists.sourceforge.net,
platform-driver-x86@vger.kernel.org
Subject: [PATCH 4/4] asus-laptop: allow boot time control of Pegatron ALS sensor
Date: Thu, 24 Mar 2011 15:02:10 -0700 [thread overview]
Message-ID: <1301004130-3294-5-git-send-email-andy.ross@windriver.com> (raw)
In-Reply-To: <1301004130-3294-1-git-send-email-andy.ross@windriver.com>
Signed-off-by: Andy Ross <andy.ross@windriver.com>
---
drivers/platform/x86/asus-laptop.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index 9b07368..1d32457 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -85,6 +85,7 @@ static int wlan_status = 1;
static int bluetooth_status = 1;
static int wimax_status = -1;
static int wwan_status = -1;
+static int als_status = -1;
module_param(wlan_status, int, 0444);
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 "
"(0 = disabled, 1 = enabled, -1 = don't do anything). "
"default is 1");
+module_param(als_status, int, 0444);
+MODULE_PARM_DESC(als_status, "Set the ALS status on boot "
+ "(0 = disabled, 1 = enabled, -1 = don't do anything). "
+ "default is 0");
+
/*
* Some events we use, same for all Asus
*/
@@ -1752,7 +1758,7 @@ static int __devinit asus_acpi_init(struct asus_laptop *asus)
asus->ledd_status = 0xFFF;
/* Set initial values of light sensor and level */
- asus->light_switch = 0; /* Default to light sensor disabled */
+ asus->light_switch = als_status >= 0 ? !!als_status : 0;
asus->light_level = 5; /* level 5 for sensor sensitivity */
if (asus->have_pega_lucid) {
--
1.7.1
prev parent reply other threads:[~2011-03-24 22:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-24 22:02 [PATCH 0/4] asus-laptop: Pegatron Lucid (WeTab/ExoPC) support Andy Ross
2011-03-24 22:02 ` [PATCH 1/4] asus-laptop: Platform detection for Pegatron Lucid Andy Ross
2011-03-24 22:02 ` [PATCH 2/4] asus-laptop: Pegatron Lucid ALS sensor Andy Ross
2011-03-25 7:48 ` Corentin Chary
2011-03-24 22:02 ` [PATCH 3/4] asus-laptop: Pegatron Lucid accelerometer Andy Ross
2011-03-25 11:21 ` Corentin Chary
2011-03-28 5:43 ` Dmitry Torokhov
2011-03-28 15:36 ` Andy Ross
2011-03-31 7:23 ` Corentin Chary
2011-04-04 17:16 ` Corentin Chary
2011-04-07 15:56 ` Anisse Astier
2011-04-07 16:09 ` Corentin Chary
2011-03-28 6:41 ` Corentin Chary
2011-03-24 22:02 ` Andy Ross [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1301004130-3294-5-git-send-email-andy.ross@windriver.com \
--to=andy.ross@windriver.com \
--cc=acpi4asus-user@lists.sourceforge.net \
--cc=corentin.chary@gmail.com \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox