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]
Message-ID: <d120d5000906250942j1d25f4d6rccc12034758f8815@mail.gmail.com>
Date:	Thu, 25 Jun 2009 09:42:42 -0700
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Alek Du <alek.du@...el.com>
Cc:	"ext-phil.2.carmody@...ia.com" <ext-phil.2.carmody@...ia.com>,
	"Nikula Jani.1 (EXT-Nixu/Helsinki)" <ext-jani.1.nikula@...ia.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Trilok Soni <soni.trilok@...il.com>,
	"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
	"ben-linux@...ff.org" <ben-linux@...ff.org>
Subject: Re: [PATCH]input: Change timer function to workqueue for gpio_keys 
	driver

On Thu, Jun 25, 2009 at 9:23 AM, Alek Du<alek.du@...el.com> wrote:
> On Fri, 26 Jun 2009 00:09:14 +0800
> Phil Carmody <ext-phil.2.carmody@...ia.com> wrote:
>
>> If you stopped calling the delay after the first transition "debouncing
>> time" and simply called it a "delay" you might more easily see that it
>> does *no* debouncing at all. Imagine putting noise on the line
>> constantly - the original code's timer would never expire. Your timer
>> will expire after a delay, and while the line is still toggling
>> frantically - you've not debounced.
>
> I don't know if it is really meaningful if you want to handle such pool signal...
> Ok, if you want to handle this ultimate case, will this patch work?
>
>        BUG_ON(irq != gpio_to_irq(button->gpio));
>
> +       cancel_delayed_work_sync(&bdata->work);

Can't do *_sync in interrupt context.

>        delay = button->debounce_interval ?
>                        msecs_to_jiffies(button->debounce_interval) : 0;
>        schedule_delayed_work(&bdata->work, delay);
>

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ