From patchwork Fri Feb 28 17:12:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 211608 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C2B7C3F2D4 for ; Fri, 28 Feb 2020 17:12:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4BD702469F for ; Fri, 28 Feb 2020 17:12:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726843AbgB1RM3 (ORCPT ); Fri, 28 Feb 2020 12:12:29 -0500 Received: from muru.com ([72.249.23.125]:58216 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725886AbgB1RM3 (ORCPT ); Fri, 28 Feb 2020 12:12:29 -0500 Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id B024D815B; Fri, 28 Feb 2020 17:13:13 +0000 (UTC) From: Tony Lindgren To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Arthur Demchenkov , Merlijn Wajer , Pavel Machek , ruleh , Sebastian Reichel Subject: [PATCH 1/3] Input: omap4-keypad - configure interrupt as level Date: Fri, 28 Feb 2020 09:12:21 -0800 Message-Id: <20200228171223.11444-2-tony@atomide.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200228171223.11444-1-tony@atomide.com> References: <20200228171223.11444-1-tony@atomide.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The interrupt should be level high for SoC internal devices. Otherwise interrupts may not be seen after a wake-up event. Cc: Arthur Demchenkov Cc: Merlijn Wajer Cc: Pavel Machek Cc: ruleh Cc: Sebastian Reichel Signed-off-by: Tony Lindgren --- drivers/input/keyboard/omap4-keypad.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c --- a/drivers/input/keyboard/omap4-keypad.c +++ b/drivers/input/keyboard/omap4-keypad.c @@ -344,7 +344,8 @@ static int omap4_keypad_probe(struct platform_device *pdev) } error = request_threaded_irq(keypad_data->irq, omap4_keypad_irq_handler, - omap4_keypad_irq_thread_fn, IRQF_ONESHOT, + omap4_keypad_irq_thread_fn, + IRQF_TRIGGER_HIGH | IRQF_ONESHOT, "omap4-keypad", keypad_data); if (error) { dev_err(&pdev->dev, "failed to register interrupt\n"); From patchwork Fri Feb 28 17:12:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 211609 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E6D7C3F2D3 for ; Fri, 28 Feb 2020 17:12:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DB380246B5 for ; Fri, 28 Feb 2020 17:12:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726906AbgB1RMd (ORCPT ); Fri, 28 Feb 2020 12:12:33 -0500 Received: from muru.com ([72.249.23.125]:58220 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726860AbgB1RMa (ORCPT ); Fri, 28 Feb 2020 12:12:30 -0500 Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id 11C1B8186; Fri, 28 Feb 2020 17:13:14 +0000 (UTC) From: Tony Lindgren To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Arthur Demchenkov , Merlijn Wajer , Pavel Machek , ruleh , Sebastian Reichel Subject: [PATCH 2/3] Input: omap4-keypad - disable unused long interrupts Date: Fri, 28 Feb 2020 09:12:22 -0800 Message-Id: <20200228171223.11444-3-tony@atomide.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200228171223.11444-1-tony@atomide.com> References: <20200228171223.11444-1-tony@atomide.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org We are not using the long interrupts and they produce extra interrupts. Let's not enable them at all. Note that also the v3.0.8 Linux Android kernel has long interrupts disabled. Cc: Arthur Demchenkov Cc: Merlijn Wajer Cc: Pavel Machek Cc: ruleh Cc: Sebastian Reichel Signed-off-by: Tony Lindgren --- drivers/input/keyboard/omap4-keypad.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c --- a/drivers/input/keyboard/omap4-keypad.c +++ b/drivers/input/keyboard/omap4-keypad.c @@ -176,10 +176,9 @@ static int omap4_keypad_open(struct input_dev *input) kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS, kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS)); kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE, - OMAP4_DEF_IRQENABLE_EVENTEN | - OMAP4_DEF_IRQENABLE_LONGKEY); + OMAP4_DEF_IRQENABLE_EVENTEN); kbd_writel(keypad_data, OMAP4_KBD_WAKEUPENABLE, - OMAP4_DEF_WUP_EVENT_ENA | OMAP4_DEF_WUP_LONG_KEY_ENA); + OMAP4_DEF_WUP_EVENT_ENA); enable_irq(keypad_data->irq);