From: Nick Leiten <nickleiten@gmail.com>
To: "platform-driver-x86@vger.kernel.org"
<platform-driver-x86@vger.kernel.org>
Subject: [PATCH] asus-wmi: Ambient sensor toggle key
Date: Sun, 19 Jun 2016 14:59:26 +0300 [thread overview]
Message-ID: <9711814.jjoeah4X4e@nl-ubook> (raw)
Hi,
here is little patch for Fn+A key assignment in asus-nb-wmi.c file so userspace can control ALS (ambient light sensor) on/off state.
As I can see mentions in Internet Asus makes 0x7a code in all their laptops to be assigned to Toggle ALS.
Tested on Asus U38N.
Signed-off-by: Nick Leiten <nickleiten@gmail.com>
diff -Npru a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
--- linux-4.6-orig/drivers/platform/x86/asus-nb-wmi.c 2016-05-16 01:43:13.000000000 +0300
+++ linux-4.6-diff/drivers/platform/x86/asus-nb-wmi.c 2016-06-06 07:00:27.000000000 +0300
@@ -356,6 +356,7 @@ static const struct key_entry asus_nb_wm
{ KE_KEY, 0x67, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + CRT + TV */
{ KE_KEY, 0x6B, { KEY_TOUCHPAD_TOGGLE } },
{ KE_IGNORE, 0x6E, }, /* Low Battery notification */
+ { KE_KEY, 0x7a, { KEY_ALS_TOGGLE } }, /* Ambient Light Sensor Toggle, Fn+A*/
{ KE_KEY, 0x7D, { KEY_BLUETOOTH } }, /* Bluetooth Enable */
{ KE_KEY, 0x7E, { KEY_BLUETOOTH } }, /* Bluetooth Disable */
{ KE_KEY, 0x82, { KEY_CAMERA } },
next reply other threads:[~2016-06-19 11:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-19 11:59 Nick Leiten [this message]
2016-06-19 13:52 ` [PATCH] asus-wmi: Ambient sensor toggle key Corentin Chary
2016-06-28 18:18 ` Darren Hart
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=9711814.jjoeah4X4e@nl-ubook \
--to=nickleiten@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