From: Maxim Mikityanskiy <maxtram95@gmail.com>
To: "platform-driver-x86@vger.kernel.org"
<platform-driver-x86@vger.kernel.org>,
Ike Panhc <ike.pan@canonical.com>
Cc: Ivan Vojtko <nekroman.sk@gmail.com>
Subject: [PATCH] Add support for fan button on Ideapad Z580
Date: Wed, 20 Mar 2013 12:34:17 +0200 [thread overview]
Message-ID: <5434364.XvFO6bLzbd@ideapad> (raw)
From: Maxim Mikityanskiy <maxtram95@gmail.com>
The patch adds support for fan control button on Ideapad Z580. This is
the same button as on Z570, but it raises different bit in
VPCCMD_R_SPECIAL_BUTTONS. Also add message to dmesg when unknown button
press detected, it will help adding support for new special buttons.
Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Tested-by: Ivan Vojtko <nekroman.sk@gmail.com>
---
--- ideapad-laptop.c
+++ ideapad-laptop.c
@@ -640,7 +640,8 @@
for (bit = 0; bit < 16; bit++) {
if (test_bit(bit, &value)) {
switch (bit) {
- case 6:
+ case 0: /* Z580 */
+ case 6: /* Z570 */
/* Thermal Management button */
ideapad_input_report(priv, 65);
break;
@@ -648,6 +649,9 @@
/* OneKey Theater button */
ideapad_input_report(priv, 64);
break;
+ default:
+ pr_info("Unknown special button: %lu\n", bit);
+ break;
}
}
}
reply other threads:[~2013-03-20 10:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=5434364.XvFO6bLzbd@ideapad \
--to=maxtram95@gmail.com \
--cc=ike.pan@canonical.com \
--cc=nekroman.sk@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