From patchwork Sun Jan 22 08:47:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zach Ploskey X-Patchwork-Id: 9530859 X-Patchwork-Delegate: andy.shevchenko@gmail.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DB48B6042F for ; Sun, 22 Jan 2017 08:56:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CAFF927E3E for ; Sun, 22 Jan 2017 08:56:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD66E27F7F; Sun, 22 Jan 2017 08:56:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AAF7227E3E for ; Sun, 22 Jan 2017 08:56:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751190AbdAVI4Q (ORCPT ); Sun, 22 Jan 2017 03:56:16 -0500 Received: from mail-s85.mailgun.info ([184.173.153.213]:51112 "EHLO mail-s85.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751160AbdAVI4Q (ORCPT ); Sun, 22 Jan 2017 03:56:16 -0500 X-Greylist: delayed 333 seconds by postgrey-1.27 at vger.kernel.org; Sun, 22 Jan 2017 03:56:15 EST DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=ploskey.com; q=dns/txt; s=mailo; t=1485075342; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=6oj1T7jC9lotteQAseXKhDm2tRnqnc8nW7c6awwdlbw=; b=kNOxMKoKIGcgG/ahmZS++aXKarvncSLESZy8QGMz93BoTFuYyy+C/2dM46s3ehFToADtzMbz ZwY7kRYb0HJeWgxWApQv0hw/A6JeRTwJy3QNrZUYdB8hPMiO5rrt8khKsok4Jco0UWN/r15K +7/glKF0XFX8eJxebrhX1q2J9GQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=ploskey.com; s=mailo; q=dns; h=Sender: From: To: Cc: Subject: Date: Message-Id; b=PS+mOac4shlK+0NWXK5o829uMdoJzWwqDU8ttMAotZyP7sqjJK/ZHtm4rLVQI8KPixPoDe UW1X9laitEy0cWIQsA3EBjnGYwR61DtZRpDtPvpNtm1cBRxygp3y8Kwh6/ADxWjqvWuWIWz2 T2Goo9C36HP1HWdNX+0gpz+oAgyqw= X-Mailgun-Sending-Ip: 184.173.153.213 X-Mailgun-Sid: WyIyYzIwZSIsICJwbGF0Zm9ybS1kcml2ZXIteDg2QHZnZXIua2VybmVsLm9yZyIsICJhYzQ5OCJd Received: from mail.ploskey.com (ploskey.com [192.241.203.22]) by mxa.mailgun.org with ESMTP id 58847261.7f07ec66edf8-smtp-out-n02; Sun, 22 Jan 2017 08:50:41 -0000 (UTC) Received: by mail.ploskey.com (Postfix, from userid 115) id 52C13413D8; Sun, 22 Jan 2017 00:50:41 -0800 (PST) Received: from znbk.localdomain (unknown [104.169.50.181]) by mail.ploskey.com (Postfix) with ESMTPSA id 015554109B; Sun, 22 Jan 2017 00:50:39 -0800 (PST) From: Zach Ploskey To: Ike Panhc , Darren Hart , platform-driver-x86@vger.kernel.org Cc: Zach Ploskey Subject: [PATCH] platform/x86: ideapad-laptop: handle ACPI event 1 Date: Sun, 22 Jan 2017 00:47:19 -0800 Message-Id: <20170122084719.2135-1-zach@ploskey.com> X-Mailer: git-send-email 2.11.0 Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Ideapad laptops, ACPI event 1 is currently not handled. Many models log "ideapad_laptop: Unknown event: 1" every 20 seconds or so while running on battery power. Some convertible laptops receive this event when switching in and out of tablet mode. This adds and additional case for event 1 in ideapad_acpi_notify to call ideapad_input_report(priv, vpc_bit), so that the event is reported to userspace and we avoid unnecessary logging. Fixes bug #107481 (https://bugzilla.kernel.org/show_bug.cgi?id=107481) Fixes bug #65751 (https://bugzilla.kernel.org/show_bug.cgi?id=65751) Signed-off-by: Zach Ploskey --- drivers/platform/x86/ideapad-laptop.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c index 410741acb3c9..f46ece2ce3c4 100644 --- a/drivers/platform/x86/ideapad-laptop.c +++ b/drivers/platform/x86/ideapad-laptop.c @@ -813,6 +813,7 @@ static void ideapad_acpi_notify(acpi_handle handle, u32 event, void *data) case 8: case 7: case 6: + case 1: ideapad_input_report(priv, vpc_bit); break; case 5: