From: JeffyChen <jeffy.chen@rock-chips.com>
To: Brian Norris <briannorris@chromium.org>
Cc: linux-kernel@vger.kernel.org, briannorris@google.com,
dtor@google.com, dianders@google.com,
Enric Balletbo i Serra <enric.balletbo@collabora.com>,
Thomas Gleixner <tglx@linutronix.de>,
Joseph Lo <josephl@nvidia.com>, stephen lu <lumotuwe@gmail.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Kate Stewart <kstewart@linuxfoundation.org>,
linux-input@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Philippe Ombredanne <pombredanne@nexb.com>,
Arvind Yadav <arvind.yadav.cs@gmail.com>
Subject: Re: [PATCH v2 1/3] Input: gpio-keys - add support for wakeup event action
Date: Fri, 23 Feb 2018 18:04:22 +0800 [thread overview]
Message-ID: <5A8FE726.6080903@rock-chips.com> (raw)
In-Reply-To: <20180212221309.GA66974@ban.mtv.corp.google.com>
Hi Brian,
Thanks for your reply.
On 02/13/2018 06:13 AM, Brian Norris wrote:
>> >
>> > if (bdata->gpiod) {
>> >+ int active_low = gpiod_is_active_low(bdata->gpiod);
>> >+
>> > if (button->debounce_interval) {
>> > error = gpiod_set_debounce(bdata->gpiod,
>> > button->debounce_interval * 1000);
>> >@@ -568,6 +572,16 @@ static int gpio_keys_setup_key(struct platform_device *pdev,
>> > isr = gpio_keys_gpio_isr;
>> > irqflags = IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING;
>> >
>> >+ switch (button->wakeup_event_action) {
>> >+ case EV_ACT_ASSERTED:
>> >+ bdata->wakeup_trigger_type = active_low ?
>> >+ IRQF_TRIGGER_FALLING : IRQF_TRIGGER_RISING;
>> >+ break;
>> >+ case EV_ACT_DEASSERTED:
>> >+ bdata->wakeup_trigger_type = active_low ?
>> >+ IRQF_TRIGGER_RISING : IRQF_TRIGGER_FALLING;
>> >+ break;
> What about EV_ACT_ANY? And default case? I think for ANY, we're OK
> letting suspend/resume not reconfigure the trigger type, but maybe a
> comment here to note that?
right, will add comment in the next version.
>
>> >+ }
>> > } else {
> 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.
i'll add comment in the next version too.
>
> Brian
>
next prev parent reply other threads:[~2018-02-23 10:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-10 11:09 [PATCH v2 0/3] gpio-keys: Add support for specifying wakeup event action Jeffy Chen
2018-02-10 11:09 ` [PATCH v2 1/3] Input: gpio-keys - add support for " Jeffy Chen
2018-02-12 22:13 ` Brian Norris
2018-02-13 10:40 ` Enric Balletbo i Serra
2018-02-13 18:25 ` Brian Norris
2018-02-13 22:25 ` Enric Balletbo Serra
2018-02-23 10:15 ` JeffyChen
2018-02-23 10:04 ` JeffyChen [this message]
2018-03-02 2:32 ` Brian Norris
2018-03-02 3:57 ` JeffyChen
2018-02-10 11:09 ` [PATCH v2 2/3] Input: gpio-keys - allow setting wakeup event action in DT Jeffy Chen
2018-03-01 21:26 ` Rob Herring
2018-02-10 11:09 ` [PATCH v2 3/3] arm64: dts: rockchip: Avoid wakeup when inserting the pen Jeffy Chen
2018-02-14 13:39 ` [PATCH v2 0/3] gpio-keys: Add support for specifying wakeup event action Heiko Stübner
2018-02-23 9:43 ` JeffyChen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5A8FE726.6080903@rock-chips.com \
--to=jeffy.chen@rock-chips.com \
--cc=arvind.yadav.cs@gmail.com \
--cc=briannorris@chromium.org \
--cc=briannorris@google.com \
--cc=dianders@google.com \
--cc=dmitry.torokhov@gmail.com \
--cc=dtor@google.com \
--cc=enric.balletbo@collabora.com \
--cc=gregkh@linuxfoundation.org \
--cc=josephl@nvidia.com \
--cc=kstewart@linuxfoundation.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lumotuwe@gmail.com \
--cc=pombredanne@nexb.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox