Thread (4 messages) flat view 4 messages, 2 authors, 2012-12-30

Re: [PATCH] input: vt8500: Add power button keypad driver

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2012-12-30 23:58:07
Also in: linux-arm-kernel, lkml

On Mon, Dec 31, 2012 at 12:44:31PM +1300, Tony Prisk wrote:
quoted
quoted
+	status = readl(pmc_base + 0x14);
+	udelay(100);
+	writel(status, pmc_base + 0x14);
+
+	if (status & BIT(14)) {
+		if (!power_button_pressed) {
No need to do this check.
The hardware generates multiple interrupts when the button is held.
Without the !power_button_pressed, it will generate multiple pressed
events without releases, because the timer doesn't get to finish.
Input core will filter out duplicate events anyway though...

And your current way means that timer is never adjusted, so the key will
be released and reported as pressed again if I keep holding it, which is
not correct.

Thanks.

-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help