Received: by 10.223.185.116 with SMTP id b49csp8206733wrg; Thu, 1 Mar 2018 19:58:28 -0800 (PST) X-Google-Smtp-Source: AG47ELt1x6O3JEYThfHupvvKgO/5qew6kI0gWFbaa+fU1YKLfZe5mzyXUyMcn85QZxUtIyXL705d X-Received: by 2002:a17:902:52ca:: with SMTP id a68-v6mr4001205pli.179.1519963108317; Thu, 01 Mar 2018 19:58:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519963108; cv=none; d=google.com; s=arc-20160816; b=aipRjQhjODbhfek8SMA8aQu5XkuUP8SaU53jRgPe4/rX6BstNTXr/0Gc6DNirLTkQs ViOuz/hHikD2OXLGhnL5t9KTQZSE1zkwhtANZMeKdsYw3YdKtmD/Z3YG/IGBHBtJ+s/w rA7Dsj4noR5XAme1WfASu0PXPWJIn9RS4X+o+wF+tApEZOCOtlY6qtsdY4B02uwrC9I3 d900kbqtSXJr49KShmvoZpdq3N/nxokuqvxXL2p86fh/g+nex6C+uzqYPQziveZzVGQr QHJ7jTbr2zhNP3EZVFze6YknI+p/Riun0GumF6Bef/9b0PPLIpbs6FFfojz3oZNNoW8A oYKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :references:subject:cc:to:mime-version:user-agent:from:date :message-id:arc-authentication-results; bh=ev7OUfgNxv8c38vIcFpaFwOa/tnQfWDhJHCmr5fd8io=; b=mAXr10ZGihsZl6vnoaom/t/L4wIEtq6L3m4reZIYpXtetm4ud7kxMWHUyoJiy0E2FZ sPIiIH4Qiq/ApjXCtPvqlqpR6YFX5PWi/Z9uRAOp9LEaU45eJRwTUDhTkXJJBtygq6fh zk5jbg2WoThmk987axoG3DFwYVlRUkBY+6MCvFdUBxuYKw571sWnKDud4HtS0Ft/6t5i ZtmwfcHVeCVnNhwFd11pcZNxU5oJfUgVed5Gt98xyf+/DL6fUZre2bWttEYnN0/HcKIj vLKJ4zU7WitCP+WRAa3sZ5XVTMo5YF56/xNjFj+iddULn+O1wGfQGDNxTRweJwW/BKix lKlA== 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 x20si3420865pgv.227.2018.03.01.19.58.13; Thu, 01 Mar 2018 19:58:28 -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 S1164330AbeCBD5g (ORCPT + 99 others); Thu, 1 Mar 2018 22:57:36 -0500 Received: from regular1.263xmail.com ([211.150.99.138]:36818 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163864AbeCBD5e (ORCPT ); Thu, 1 Mar 2018 22:57:34 -0500 Received: from jeffy.chen?rock-chips.com (unknown [192.168.167.183]) by regular1.263xmail.com (Postfix) with ESMTP id 772F379E6; Fri, 2 Mar 2018 11:57:30 +0800 (CST) X-263anti-spam: KSV:0;BIG:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ADDR-CHECKED4: 1 X-ABS-CHECKED: 1 X-SKE-CHECKED: 1 X-ANTISPAM-LEVEL: 2 Received: from [172.16.22.73] (localhost [127.0.0.1]) by smtp.263.net (Postfix) with ESMTPA id 90B73363; Fri, 2 Mar 2018 11:57:24 +0800 (CST) X-RL-SENDER: jeffy.chen@rock-chips.com X-FST-TO: briannorris@chromium.org X-SENDER-IP: 103.29.142.67 X-LOGIN-NAME: jeffy.chen@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-SENDER: cjf@rock-chips.com X-DNS-TYPE: 0 Received: from [172.16.22.73] (unknown [103.29.142.67]) by smtp.263.net (Postfix) whith ESMTP id 8691NRVZVJ; Fri, 02 Mar 2018 11:57:30 +0800 (CST) Message-ID: <5A98CBA1.6090801@rock-chips.com> Date: Fri, 02 Mar 2018 11:57:21 +0800 From: JeffyChen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:19.0) Gecko/20130126 Thunderbird/19.0 MIME-Version: 1.0 To: Brian Norris CC: linux-kernel@vger.kernel.org, briannorris@google.com, dtor@google.com, dianders@google.com, Enric Balletbo i Serra , Thomas Gleixner , Joseph Lo , stephen lu , Dmitry Torokhov , Kate Stewart , linux-input@vger.kernel.org, Greg Kroah-Hartman , Philippe Ombredanne , Arvind Yadav Subject: Re: [PATCH v2 1/3] Input: gpio-keys - add support for wakeup event action References: <20180210110907.5504-1-jeffy.chen@rock-chips.com> <20180210110907.5504-2-jeffy.chen@rock-chips.com> <20180212221309.GA66974@ban.mtv.corp.google.com> <5A8FE726.6080903@rock-chips.com> <20180302023229.GA164361@rodete-desktop-imager.corp.google.com> In-Reply-To: <20180302023229.GA164361@rodete-desktop-imager.corp.google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Brain, Thanks for your reply. On 03/02/2018 10:32 AM, Brian Norris wrote: >>> > >What about the 'else' case? Shouldn't we try to handle that? >> >i think the else case is for irq key, which would generate down and up >> >events in one irq, so it would use the same trigger type for all these 3 >> >cases. > Not necessarily. It uses whatever trigger was provided in > platform/DT/etc. data. You could retrieve that with > irq_get_trigger_type() and try to interpret that. Or you could just > outlaw using that combination (e.g., in the binding documentation). i think for the IRQ button case the assert/deassert/any are using the same irq trigger type, so it should be ok to leave the wakeup trigger type to be 0(not reconfigure the trigger type)... i've made a v3 to add a comment about that, but forgot to send it :( > > Brian >