lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 23 Feb 2018 18:04:22 +0800
From:   JeffyChen <jeffy.chen@...k-chips.com>
To:     Brian Norris <briannorris@...omium.org>
CC:     linux-kernel@...r.kernel.org, briannorris@...gle.com,
        dtor@...gle.com, dianders@...gle.com,
        Enric Balletbo i Serra <enric.balletbo@...labora.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Joseph Lo <josephl@...dia.com>,
        stephen lu <lumotuwe@...il.com>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Kate Stewart <kstewart@...uxfoundation.org>,
        linux-input@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Philippe Ombredanne <pombredanne@...b.com>,
        Arvind Yadav <arvind.yadav.cs@...il.com>
Subject: Re: [PATCH v2 1/3] Input: gpio-keys - add support for wakeup event
 action

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
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ