From patchwork Thu Sep 17 16:06:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "qipeng.zha" X-Patchwork-Id: 7203131 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 109D99F380 for ; Thu, 17 Sep 2015 08:03:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 44001207C8 for ; Thu, 17 Sep 2015 08:03:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 54CFA207C5 for ; Thu, 17 Sep 2015 08:03:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753912AbbIQIDH (ORCPT ); Thu, 17 Sep 2015 04:03:07 -0400 Received: from mga02.intel.com ([134.134.136.20]:53226 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753835AbbIQIDG (ORCPT ); Thu, 17 Sep 2015 04:03:06 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 17 Sep 2015 01:03:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,545,1437462000"; d="scan'208";a="791524607" Received: from shbuild999.sh.intel.com ([10.239.146.206]) by fmsmga001.fm.intel.com with ESMTP; 17 Sep 2015 01:03:04 -0700 From: Qipeng Zha To: linux-input@vger.kernel.org Cc: dmitry.torokhov@gmail.com, linus.walleij@linaro.org, qipeng.zha@intel.com, Qi Zheng , Aubrey Li Subject: [PATCH] input:gpio-key: set IRQF_NO_SUSPEND for wake capable key Date: Fri, 18 Sep 2015 00:06:59 +0800 Message-Id: <1442506019-13687-1-git-send-email-qipeng.zha@intel.com> X-Mailer: git-send-email 1.8.3.2 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, DATE_IN_FUTURE_06_12, 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 When wakeup attribute is set, GPIO key is supposed to wake up the system from system sleep state, So set IRQF_NO_SUSPEND flag to keep IRQ enabled during suspend. Signed-off-by: Qi Zheng Signed-off-by: Aubrey Li Signed-off-by: Qipeng Zha Reviewed-by: Linus Walleij --- drivers/input/keyboard/gpio_keys.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index ddf4045..9744ad9 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -528,6 +528,8 @@ static int gpio_keys_setup_key(struct platform_device *pdev, */ if (!button->can_disable) irqflags |= IRQF_SHARED; + if (button->wakeup) + irqflags |= IRQF_NO_SUSPEND; error = devm_request_any_context_irq(&pdev->dev, bdata->irq, isr, irqflags, desc, bdata);