Received: by 10.223.185.116 with SMTP id b49csp5999873wrg; Wed, 7 Mar 2018 23:34:03 -0800 (PST) X-Google-Smtp-Source: AG47ELtSxmilLWFFQIZ4xX3upSfAa+6C2xGGPV06Al1RS3OFHk7nkXEO31SGtZIyxzNLN/VavaL8 X-Received: by 10.99.108.129 with SMTP id h123mr13265786pgc.30.1520494443232; Wed, 07 Mar 2018 23:34:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520494443; cv=none; d=google.com; s=arc-20160816; b=J4tU3nEZCZ3aQ1bTTWO8ZJ/MG6rSc4Sb+EZF65iB33cnWibzNhPGCUsClpxxBEiLY9 Ws94YNFyInGUz47D6m2lBAu9HkQGLL0LHqRqqO/B1Xnb/b62wHmihJgig+4ujr+47xxT +IUT5iloX7biTw0oMWsxKzKoh/aLRey6shVsvvRAwbb7w1bbFcCxed6xLzlh1H7BPU22 vAUAmkGHoTb0HhuS/J4zpz0UkrliI+qa/5cb8Bse+9tHe9oBrMX/fJ9WkmYXPNX2iSCQ lp+zFeUQ931OPLGX70nQ09/v+EUjGamFMho7h8Uc67Bq5NKgs7FDuywf3xqoesuoUWcQ PvzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=b5XMop040f1T6xhoMdd33QkcesO5VU4qhNVo2HofzUo=; b=w6ZYx1DI4Xj+8AfT3h0pU/zl+lf9Frc+LU6WzOy+SDtaNVay2g02hrYDX4PVNXCrYh KrFtjiq/mVVHZW5I6Jd1CL6doeIlfwB0dKGVrqPIremF76/YpLT8GX1eXELSr4J92PH2 lxnNGr8I3KFHTG3JhQ4O7MigD4B02Nj/xBN8HjbRRg/0JHsVBrwNswCSL+c+EstRHBKK QQNffNEUOvOUKOJxEy4Rbg/AtEsz6tM5kAVELJdwvabBembnOcfJl6cbrAa1OTnp9bbW RC4QLlQatC825PllgLGMnIo+IqhqD/ai5nLFv1x7ulyRYM6b0JM3ivskSgpVm9M14ykA 14kA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c19-v6si2787870plo.652.2018.03.07.23.33.49; Wed, 07 Mar 2018 23:34:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934903AbeCHHcr (ORCPT + 99 others); Thu, 8 Mar 2018 02:32:47 -0500 Received: from regular1.263xmail.com ([211.150.99.141]:48344 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754980AbeCHHcm (ORCPT ); Thu, 8 Mar 2018 02:32:42 -0500 Received: from jeffy.chen?rock-chips.com (unknown [192.168.167.76]) by regular1.263xmail.com (Postfix) with ESMTP id C62AF61; Thu, 8 Mar 2018 15:32:34 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 Received: from localhost (localhost [127.0.0.1]) by smtp.263.net (Postfix) with ESMTPA id 94FB93AE; Thu, 8 Mar 2018 15:32:16 +0800 (CST) X-RL-SENDER: jeffy.chen@rock-chips.com X-FST-TO: linux-kernel@vger.kernel.org X-SENDER-IP: 103.29.142.67 X-LOGIN-NAME: jeffy.chen@rock-chips.com X-UNIQUE-TAG: <1d485442e60a007ee60408f07531de68> X-ATTACHMENT-NUM: 0 X-SENDER: cjf@rock-chips.com X-DNS-TYPE: 0 Received: from localhost (unknown [103.29.142.67]) by smtp.263.net (Postfix) whith ESMTP id 30516RYS30H; Thu, 08 Mar 2018 15:32:29 +0800 (CST) From: Jeffy Chen To: linux-kernel@vger.kernel.org Cc: briannorris@google.com, heiko@sntech.de, dtor@google.com, dianders@google.com, Jeffy Chen , Guenter Roeck , Arnd Bergmann , Joseph Lo , Rob Herring , Catalin Marinas , Emil Renner Berthing , Brian Norris , Thomas Gleixner , Philippe Ombredanne , linux-rockchip@lists.infradead.org, Kate Stewart , linux-input@vger.kernel.org, Will Deacon , Matthias Kaehlcke , devicetree@vger.kernel.org, stephen lu , Greg Kroah-Hartman , Arvind Yadav , linux-arm-kernel@lists.infradead.org, Dmitry Torokhov , Mark Rutland Subject: [PATCH v5 0/3] gpio-keys: Add support for specifying wakeup event action Date: Thu, 8 Mar 2018 15:32:10 +0800 Message-Id: <20180308073213.8419-1-jeffy.chen@rock-chips.com> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On chromebook kevin, we are using gpio-keys for pen insert event. But we only want it to wakeup the system when ejecting the pen. So we may need to change the interrupt trigger type during suspending. Changes in v5: Remove unneeded irq_wake flag as Andy suggested. Changes in v4: Add dt-binding gpio-keys.h, stop saving irq trigger type, add enable/disable wakeup helpers as Dmitry suggested. Include dt-binding gpio-keys.h Changes in v3: Adding more comments as Brian suggested. Changes in v2: Specify wakeup event action instead of irq trigger type as Brian suggested. Specify wakeup event action instead of irq trigger type as Brian suggested. Specify wakeup event action instead of irq trigger type as Brian suggested. Jeffy Chen (3): Input: gpio-keys - add support for wakeup event action Input: gpio-keys - allow setting wakeup event action in DT arm64: dts: rockchip: kevin: Avoid wakeup when inserting the pen .../devicetree/bindings/input/gpio-keys.txt | 8 +++ arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts | 3 ++ drivers/input/keyboard/gpio_keys.c | 63 ++++++++++++++++++++-- include/dt-bindings/input/gpio-keys.h | 13 +++++ include/linux/gpio_keys.h | 2 + 5 files changed, 86 insertions(+), 3 deletions(-) create mode 100644 include/dt-bindings/input/gpio-keys.h -- 2.11.0