From patchwork Fri Jun 17 03:44:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alex Hung X-Patchwork-Id: 9182409 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 E23E06075D for ; Fri, 17 Jun 2016 03:44:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D37EA28399 for ; Fri, 17 Jun 2016 03:44:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C6621283A1; Fri, 17 Jun 2016 03:44:42 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 560D728399 for ; Fri, 17 Jun 2016 03:44:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755146AbcFQDok (ORCPT ); Thu, 16 Jun 2016 23:44:40 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:60908 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755124AbcFQDok (ORCPT ); Thu, 16 Jun 2016 23:44:40 -0400 Received: from 1.general.alexhung.us.vpn ([10.172.65.254] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1bDkhw-0000Md-Tq; Fri, 17 Jun 2016 03:44:37 +0000 From: Alex Hung To: mjg59@srcf.ucam.org, pali.rohar@gmail.com, dvhart@infradead.org, platform-driver-x86@vger.kernel.org, alex.hung@canonical.com Subject: [PATCH][v2] dell-wmi: add a WMI event code for display on/off Date: Fri, 17 Jun 2016 11:44:27 +0800 Message-Id: <1466135067-28566-1-git-send-email-alex.hung@canonical.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.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 Some new Dell AIO systems have a button that generates WMI evnet that is to be used to turn LCD on/off. Acked-by: Pali Rohár Signed-off-by: Alex Hung --- drivers/platform/x86/dell-wmi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c index b8ad055..8e6c357 100644 --- a/drivers/platform/x86/dell-wmi.c +++ b/drivers/platform/x86/dell-wmi.c @@ -133,6 +133,9 @@ static const struct key_entry dell_wmi_keymap_type_0000[] __initconst = { /* Audio panel key */ { KE_IGNORE, 0xe026, { KEY_RESERVED } }, + /* Monitor On/Off Control key */ + { KE_KEY, 0xe027, { KEY_DISPLAYTOGGLE } }, + /* Untested, Multimedia key on Dell Vostro 3560 */ /* { KE_IGNORE, 0xe028, { KEY_RESERVED } }, */