summaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorMaxim Mikityanskiy <maxtram95@gmail.com>2013-03-20 11:34:17 +0100
committerMatthew Garrett <matthew.garrett@nebula.com>2013-05-09 02:00:50 +0200
commita1ec56ed9f42fb5374cd2add373811c9527c0995 (patch)
tree1206932fad7cb6e90fce7ddc290afce5986f10a0 /drivers/platform
parentpvpanic: pvpanic device driver (diff)
downloadlinux-a1ec56ed9f42fb5374cd2add373811c9527c0995.tar.xz
linux-a1ec56ed9f42fb5374cd2add373811c9527c0995.zip
Add support for fan button on Ideapad Z580
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> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/ideapad-laptop.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
index 17f00b8dc5cb..89c4519d48ac 100644
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@ -640,7 +640,8 @@ static void ideapad_check_special_buttons(struct ideapad_private *priv)
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 @@ static void ideapad_check_special_buttons(struct ideapad_private *priv)
/* OneKey Theater button */
ideapad_input_report(priv, 64);
break;
+ default:
+ pr_info("Unknown special button: %lu\n", bit);
+ break;
}
}
}