From patchwork Thu Jun 16 03:25:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Hung X-Patchwork-Id: 9179799 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 DFDFC604DB for ; Thu, 16 Jun 2016 03:25:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF48927BF7 for ; Thu, 16 Jun 2016 03:25:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C1E9F27DA4; Thu, 16 Jun 2016 03:25:18 +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 AB6B827BF7 for ; Thu, 16 Jun 2016 03:25:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932393AbcFPDZQ (ORCPT ); Wed, 15 Jun 2016 23:25:16 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:47819 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932570AbcFPDZQ (ORCPT ); Wed, 15 Jun 2016 23:25:16 -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 1bDNvc-0004hQ-Qa; Thu, 16 Jun 2016 03:25:13 +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] dell-wmi: add a WMI event code for display on/off Date: Thu, 16 Jun 2016 11:25:08 +0800 Message-Id: <1466047508-18799-1-git-send-email-alex.hung@canonical.com> X-Mailer: git-send-email 2.7.4 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 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 15c6f11..298aba1 100644 --- a/drivers/platform/x86/dell-wmi.c +++ b/drivers/platform/x86/dell-wmi.c @@ -125,6 +125,9 @@ static const struct key_entry dell_wmi_legacy_keymap[] __initconst = { /* Audio panel key */ { KE_IGNORE, 0xe026, { KEY_RESERVED } }, + /* Monitor On/Off Control key */ + { KE_KEY, 0xe027, { KEY_DISPLAYTOGGLE } }, + { KE_IGNORE, 0xe02e, { KEY_VOLUMEDOWN } }, { KE_IGNORE, 0xe030, { KEY_VOLUMEUP } }, { KE_IGNORE, 0xe033, { KEY_KBDILLUMUP } },