* [PATCH] Add support for fan button on Ideapad Z580
@ 2013-03-20 10:34 Maxim Mikityanskiy
0 siblings, 0 replies; only message in thread
From: Maxim Mikityanskiy @ 2013-03-20 10:34 UTC (permalink / raw)
To: platform-driver-x86@vger.kernel.org, Ike Panhc; +Cc: Ivan Vojtko
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;
}
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-03-20 10:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-20 10:34 [PATCH] Add support for fan button on Ideapad Z580 Maxim Mikityanskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox