Received: by 10.223.185.116 with SMTP id b49csp4947709wrg; Wed, 7 Mar 2018 03:58:33 -0800 (PST) X-Google-Smtp-Source: AG47ELs5MQ1MNzoD4AXrcJniJ8YiqyPkaaCu/wVLTCeZlvENvZTYPPIWViVvRMbWUOps+Fa6yTvT X-Received: by 10.98.16.131 with SMTP id 3mr22441161pfq.188.1520423913543; Wed, 07 Mar 2018 03:58:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520423913; cv=none; d=google.com; s=arc-20160816; b=lgyXrLvgvff9vjxr7dMCx9KLXwRfKU4lRxiRxYo1p8RvyC0HBJaE+EAnoemy1+h7wM qqUoT18CTP9IoMR0r5fmj3J0MwqD/om858ppQkTilUrg46D5Nt7P5/DzE/rFGbzCLmlp Si3jiQOKcyMyG5s82w4/RcREKUz8TOEqVh4G4rN8ptKej8aIZcX1eaoBPgO3gUtBbsqw pGKPTcoFFFaoSbG3jQBSvUd/g+zYTqYStOAYalgKhtXb6wgny/1NZ5iL+2z3SMYx9+wq 4KQOjQbaNiIXhkPmvN+ktMS/eqPEItSNNWuva0igVP1TZk+STYi/XUHsQUn5l5zhlrLo A4iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=dD9lUSFXnJlPOfoKLvWtTjzJNYtb48Y88z96oC8xSew=; b=hk4iC+jRwYLTItz89pwt9shq/3kyhPCL293b0wjuBibvVzOKWmpDjHqtczdSBpZe+7 9v2UrR3p2r6MUCFlcmcg6xz+aRp0euhEuemcsPELnENMGQnN3jsN1MTqF5RUZV4W/9OH 9RswT8mzIJZHoVqdJk+PtLuO7u3IskZRzHDcpXgXJVVxPmyzVWyBKN2v4kClTmIdJ4Dv 6xCYXJOqhDZIKYoE6yCHoVS6O+tO2srMoXHxDVUmQpwe69zwuIc34Asf8xQEuN9+UOxk JKqIEDS2AkK+g1fKQTHPx+sDJLR5L9a3KfqS5XZyiz/rMrVjQDy4XGIU0Ur+XvmbkBK4 b7cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Qb8Sixyy; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k30si11312492pgn.319.2018.03.07.03.58.17; Wed, 07 Mar 2018 03:58:33 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Qb8Sixyy; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754331AbeCGL5W (ORCPT + 99 others); Wed, 7 Mar 2018 06:57:22 -0500 Received: from mail-qt0-f195.google.com ([209.85.216.195]:33414 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751189AbeCGL5T (ORCPT ); Wed, 7 Mar 2018 06:57:19 -0500 Received: by mail-qt0-f195.google.com with SMTP id a23so2253743qtn.0; Wed, 07 Mar 2018 03:57:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=dD9lUSFXnJlPOfoKLvWtTjzJNYtb48Y88z96oC8xSew=; b=Qb8SixyyRWACbQGvkeW59iCjLzlLhthsKFFSMuTifM8HuOmssWY4WDnSMdzfYNg0mU 4+VixvRqZFLcvMw7Q12cOEE27gm1rNfIOaSaT69IC3UxloTF3VccT/4X0v1QonjVEMBV YU8/xD0X871KUucRW84YBB0JfFn2OVIeSdn6ioWLaggHM4+GMtsaKjaXvqTm55+J42yi QOTGuCpYv9dQCVoXDroPvpB3IpsBgLrgRSDbMtoGmeXGX+mOWfuZ81HXWoZr+BsKEbNc oqtR6U76WVOl7Zz+vZ56/N8SKknMZCLpB0yiSIZWwN76p6dct4gQaP0a/HMmejWSeDZN fIWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=dD9lUSFXnJlPOfoKLvWtTjzJNYtb48Y88z96oC8xSew=; b=S+CjyPUinuW4C9VtAn5/RHl62hs3P1/f8dlgqZ+14BrVD3Y3DNCBL3SK0sgENphefc mso0r8onMM2ZtVQGyZ1CAQ05x2wOYkii3KkxSMwTmDRFtPzJA0FQtFuMRNBnCFazpY5f n1ukcMftySSqDwuryrFs/v8wfUNkg58gXyhkv35R8osfnJXTQ75HEF0UBfea4WA0qCOp G2ic2O0UFO6s/OEdGx5JlzGem72LnipUQB7qubxN8m4dtqzmlLLnRAAT/XlT19FR7u+h UxrQ7gbSs4zghp5oHcaZ9swGbh8e2gP/jASllofWgbcCkZ1YZzz1xtrpwtQMzlrl1Fo8 5NDw== X-Gm-Message-State: AElRT7EhgSdvElA6ljgAh3bznZ2aaZVyxqAIoaciADG0L7pKBomRe5Qc GTlj1rZTnqZYHYdM9vr71iexhPzzxbfNza1KCn4= X-Received: by 10.200.26.79 with SMTP id q15mr32669428qtk.174.1520423838304; Wed, 07 Mar 2018 03:57:18 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.195.80 with HTTP; Wed, 7 Mar 2018 03:57:17 -0800 (PST) In-Reply-To: <20180306074418.8879-2-jeffy.chen@rock-chips.com> References: <20180306074418.8879-1-jeffy.chen@rock-chips.com> <20180306074418.8879-2-jeffy.chen@rock-chips.com> From: Andy Shevchenko Date: Wed, 7 Mar 2018 13:57:17 +0200 Message-ID: Subject: Re: [PATCH v4 1/3] Input: gpio-keys - add support for wakeup event action To: Jeffy Chen Cc: Linux Kernel Mailing List , briannorris@google.com, =?UTF-8?Q?Heiko_St=C3=BCbner?= , Dmitry Torokhov , Douglas Anderson , devicetree , Guenter Roeck , Thomas Gleixner , Joseph Lo , stephen lu , Rob Herring , Dmitry Torokhov , Kate Stewart , linux-input , Greg Kroah-Hartman , Mark Rutland , Philippe Ombredanne , Arvind Yadav Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 6, 2018 at 9:44 AM, Jeffy Chen wrote: > Add support for specifying event actions to trigger wakeup when using > the gpio-keys input device as a wakeup source. > > This would allow the device to configure when to wakeup the system. For > example a gpio-keys input device for pen insert, may only want to wakeup > the system when ejecting the pen. > + bool wakeup_enabled; > + if (bdata->wakeup_enabled) { This is redundant. IRQ core keeps track on this information already. Check below as an example aef3ad103a68 ("serial: core: remove unneeded irq_wake flag") -- With Best Regards, Andy Shevchenko