From patchwork Tue Dec 8 17:55:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Twiss X-Patchwork-Id: 7800921 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2E2FCBEEE1 for ; Tue, 8 Dec 2015 18:12:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4A998204D2 for ; Tue, 8 Dec 2015 18:12:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 515C3204AD for ; Tue, 8 Dec 2015 18:12:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751643AbbLHSMk (ORCPT ); Tue, 8 Dec 2015 13:12:40 -0500 Received: from mail1.bemta14.messagelabs.com ([193.109.254.110]:61103 "EHLO mail1.bemta14.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751083AbbLHSMk (ORCPT ); Tue, 8 Dec 2015 13:12:40 -0500 X-Greylist: delayed 403 seconds by postgrey-1.27 at vger.kernel.org; Tue, 08 Dec 2015 13:12:39 EST Received: from [85.158.140.211] by server-6.bemta-14.messagelabs.com id AD/9C-16618-30C17665; Tue, 08 Dec 2015 18:05:55 +0000 X-Env-Sender: stwiss.opensource@diasemi.com X-Msg-Ref: server-9.tower-194.messagelabs.com!1449597955!7081790!1 X-Originating-IP: [94.185.165.51] X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 27382 invoked from network); 8 Dec 2015 18:05:55 -0000 Received: from mailrelay2.diasemi.com (HELO sw-ex-cashub01.diasemi.com) (94.185.165.51) by server-9.tower-194.messagelabs.com with AES128-SHA encrypted SMTP; 8 Dec 2015 18:05:55 -0000 Received: from swsrvapps-01.diasemi.com (10.20.28.141) by SW-EX-CASHUB01.diasemi.com (10.20.16.140) with Microsoft SMTP Server id 14.3.248.2; Tue, 8 Dec 2015 18:05:55 +0000 Received: by swsrvapps-01.diasemi.com (Postfix, from userid 22547) id F29B93FB25; Tue, 8 Dec 2015 18:05:54 +0000 (GMT) From: Steve Twiss Date: Tue, 8 Dec 2015 17:55:05 +0000 Subject: [PATCH V1] input: da9063: report KEY_POWER instead of KEY_SLEEP during power key-press To: Dmitry Torokhov , LINUX-INPUT , LINUXKERNEL CC: David Dajun Chen , Support Opensource Message-ID: <20151208180554.F29B93FB25@swsrvapps-01.diasemi.com> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Steve Twiss Stop reporting KEY_SLEEP for a short key-press and report KEY_POWER instead This change applied to both DA9063 and DA9062 ONKEY drivers. Signed-off-by: Steve Twiss --- This patch applies against linux-next and v4.4-rc4 Regards, Steve drivers/input/misc/da9063_onkey.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/misc/da9063_onkey.c b/drivers/input/misc/da9063_onkey.c index 8eb697d..bb863e0 100644 --- a/drivers/input/misc/da9063_onkey.c +++ b/drivers/input/misc/da9063_onkey.c @@ -179,13 +179,13 @@ static irqreturn_t da9063_onkey_irq_handler(int irq, void *data) input_report_key(onkey->input, KEY_POWER, 1); input_sync(onkey->input); schedule_delayed_work(&onkey->work, 0); - dev_dbg(onkey->dev, "KEY_POWER pressed.\n"); + dev_dbg(onkey->dev, "KEY_POWER long press.\n"); } else { - input_report_key(onkey->input, KEY_SLEEP, 1); + input_report_key(onkey->input, KEY_POWER, 1); input_sync(onkey->input); - input_report_key(onkey->input, KEY_SLEEP, 0); + input_report_key(onkey->input, KEY_POWER, 0); input_sync(onkey->input); - dev_dbg(onkey->dev, "KEY_SLEEP pressed.\n"); + dev_dbg(onkey->dev, "KEY_POWER short press.\n"); } return IRQ_HANDLED;