Received: by 10.213.65.16 with SMTP id m16csp281305imf; Mon, 12 Mar 2018 03:42:28 -0700 (PDT) X-Google-Smtp-Source: AG47ELvHhm5j7kPmxI9D6kK8e7WgxfjOo/72KdKLeoA9eknQUKiUaSFKCWSn0cD16Tr9xh9PyL/D X-Received: by 2002:a17:902:744b:: with SMTP id e11-v6mr4899624plt.351.1520851348185; Mon, 12 Mar 2018 03:42:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520851348; cv=none; d=google.com; s=arc-20160816; b=I5r8W2ALyRDBzoglIreDDInZcsrmSWESu7MFqRkqDGaBxS3Xtx0uM4KzFFFJ1sP7qw 44iRApjuYyCF49RzgXD6pVFepN32iK/LTsH8UembzLm9ipLCkZxq6yGt9gDbDKWx568S 3xiCSuCd3Fx7lgk3j/xrp0VdnuBB2qC31+4hs2A0vJlGA4mXECiM7YoWK26xidt09yqL 0HYtQAmTcJGfwBMsMhvw4SfiNUoJawUPp5P3xBgCa5t+7dxZvP3vhFtsDWfXnRSgccLL T79q/PlfgY0ozAE7KFSYyKZVVSXnPnGoGuZgP88ldl0SknlRY0WgUHWcT16OD98whaBr G8bQ== 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=D+SwsyI0LP8bkbxPhArxY7EQzSL7UywbN0KeHsWqnLc=; b=yIF78DEi0XEUwaaEhzyhbZ5rqWYlCotp9Z+RNOBumoKAe4cCLgmOb67yCSuNrrkl6n Z0hyXXPDgq//YBBJV0i4/TTsfJIlbUwawQ0DDHTIOHqAxXMUkBr6/ZkGEMScZP1OOyz5 gm5y3s8LTjkQ+IaQJCAUKfbKJ+S0wcDcaDT5qed2xtka5lz4+2eULDZ12C0e4Ke7rIeO /jejIBay9HXGooa1LmRWoPmrAnpKlIlfQxStViHPf2ISUFMkesiSbfSn0fx5BdeMrqnh OxTm4Ry1JhViq1mgi/wyV02wuE7p2UVh1h+dWIX7nAUCm2B/GV78gyLuibCCo2d8nxKO YBug== 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 w1si4780289pgq.135.2018.03.12.03.42.12; Mon, 12 Mar 2018 03:42:28 -0700 (PDT) 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 S1752531AbeCLKlV (ORCPT + 99 others); Mon, 12 Mar 2018 06:41:21 -0400 Received: from regular1.263xmail.com ([211.150.99.137]:46005 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751229AbeCLKlS (ORCPT ); Mon, 12 Mar 2018 06:41:18 -0400 Received: from jeffy.chen?rock-chips.com (unknown [192.168.167.41]) by regular1.263xmail.com (Postfix) with ESMTP id 10EA8DBFD; Mon, 12 Mar 2018 18:41:01 +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 868813BE; Mon, 12 Mar 2018 18:40:55 +0800 (CST) X-RL-SENDER: jeffy.chen@rock-chips.com X-FST-TO: dmitry.torokhov@gmail.com X-SENDER-IP: 103.29.142.67 X-LOGIN-NAME: jeffy.chen@rock-chips.com X-UNIQUE-TAG: <17ae0c86732fcf0a53f11d02bce73a94> 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 1102HC91YK; Mon, 12 Mar 2018 18:41:02 +0800 (CST) Message-ID: <5AA65936.7040500@rock-chips.com> Date: Mon, 12 Mar 2018 18:40:54 +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: Dmitry Torokhov CC: linux-kernel@vger.kernel.org, briannorris@google.com, heiko@sntech.de, dtor@google.com, dianders@google.com, devicetree@vger.kernel.org, Guenter Roeck , Thomas Gleixner , Joseph Lo , stephen lu , Rob Herring , Kate Stewart , linux-input@vger.kernel.org, Greg Kroah-Hartman , Mark Rutland , Philippe Ombredanne , Arvind Yadav Subject: Re: [PATCH v5 1/3] Input: gpio-keys - add support for wakeup event action References: <20180308073213.8419-1-jeffy.chen@rock-chips.com> <20180308073213.8419-2-jeffy.chen@rock-chips.com> <20180310181509.GB260013@dtor-ws> In-Reply-To: <20180310181509.GB260013@dtor-ws> 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 Dmitry, Thanks for your reply. On 03/11/2018 02:15 AM, Dmitry Torokhov wrote:>> +static int gpio_keys_enable_wakeup(struct gpio_button_data *bdata) > These new helpers need to be __maybe_unused in case we compile on system > without suspend support. > > I also wanted a bit more of error handling, so I ended up with the > version of the patch below. Can you please try it and let me know if I > broke it. sure, the patch you sent works :) Tested-by: Jeffy Chen > > Thanks. > > -- Dmitry > > Input: gpio-keys - add support for wakeup event action > > From: Jeffy Chen > > 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. > > Suggested-by: Brian Norris > Signed-off-by: Jeffy Chen > Reviewed-by: Rob Herring > Signed-off-by: Dmitry Torokhov