Felipe Balbi | 13 Jun 2011 23:16
Picon
Favicon

[PATCH] input: keypad: lm8323: convert to threaded IRQ

there's no need for that workqueue anymore.
Get rid of it and move to threaded IRQs
instead.

Signed-off-by: Felipe Balbi <balbi <at> ti.com>
---

compile tested only. I need someone to reply with
a Tested-by tag.

 drivers/input/keyboard/lm8323.c |   23 ++++-------------------
 1 files changed, 4 insertions(+), 19 deletions(-)

diff --git a/drivers/input/keyboard/lm8323.c b/drivers/input/keyboard/lm8323.c
index 71f744a8..3b21f42 100644
--- a/drivers/input/keyboard/lm8323.c
+++ b/drivers/input/keyboard/lm8323.c
 <at>  <at>  -146,7 +146,6  <at>  <at>  struct lm8323_chip {
 	/* device lock */
 	struct mutex		lock;
 	struct i2c_client	*client;
-	struct work_struct	work;
 	struct input_dev	*idev;
 	bool			kp_enabled;
 	bool			pm_suspend;
 <at>  <at>  -162,7 +161,6  <at>  <at>  struct lm8323_chip {

 #define client_to_lm8323(c)	container_of(c, struct lm8323_chip, client)
 #define dev_to_lm8323(d)	container_of(d, struct lm8323_chip, client->dev)
-#define work_to_lm8323(w)	container_of(w, struct lm8323_chip, work)
(Continue reading)

Leigh Brown | 19 Jun 2011 21:00
Picon

Re: [PATCH] input: keypad: lm8323: convert to threaded IRQ

Hi Felipe,

Many thanks for trying to assist me with my problem. To recap,
I'm seeing the keypad lock-up on my N810 using this driver,
when I type quickly.

I tried your patch, and it doesn't fix the issue.  However, I've
read the datasheet for the lm8323 and it looks to me like the
interrupt should be level rather than edge triggered.

The following additional patch makes things work for me.  I
couldn't tell you if it's the correct thing to do but I can no
longer cause the keypad to lock-up by typing too fast.

Regards,

Leigh.

--

-- 

diff --git a/drivers/input/keyboard/lm8323.c 
b/drivers/input/keyboard/lm8323.c
index 3b21f42..ab0acaf 100644
--- a/drivers/input/keyboard/lm8323.c
+++ b/drivers/input/keyboard/lm8323.c
 <at>  <at>  -734,7 +734,7  <at>  <at>  static int __devinit lm8323_probe(struct i2c_client 
*client,
  	}

  	err = request_threaded_irq(client->irq, NULL, lm8323_irq,
(Continue reading)

Felipe Balbi | 19 Jun 2011 21:56
Picon
Favicon

Re: [PATCH] input: keypad: lm8323: convert to threaded IRQ

Hi,

On Sun, Jun 19, 2011 at 07:00:13PM +0000, Leigh Brown wrote:
> Many thanks for trying to assist me with my problem. To recap,

yeah, no problem ;-)

> I'm seeing the keypad lock-up on my N810 using this driver,
> when I type quickly.
> 
> I tried your patch, and it doesn't fix the issue.  However, I've
> read the datasheet for the lm8323 and it looks to me like the
> interrupt should be level rather than edge triggered.
> 
> The following additional patch makes things work for me.  I
> couldn't tell you if it's the correct thing to do but I can no
> longer cause the keypad to lock-up by typing too fast.

good good. Looks like IRQF_ONESHOT is what did the trick.

Did you check if IRQF_ONESHOT alone was enough ?

--

-- 
balbi
Leigh Brown | 20 Jun 2011 00:01
Picon

Re: [PATCH] input: keypad: lm8323: convert to threaded IRQ

On Sun, 19 Jun 2011 22:56:06 +0300, Felipe Balbi wrote:
> Hi,
>
> On Sun, Jun 19, 2011 at 07:00:13PM +0000, Leigh Brown wrote:
>> Many thanks for trying to assist me with my problem. To recap,
>
> yeah, no problem ;-)
>
>> I'm seeing the keypad lock-up on my N810 using this driver,
>> when I type quickly.
>>
>> I tried your patch, and it doesn't fix the issue.  However, I've
>> read the datasheet for the lm8323 and it looks to me like the
>> interrupt should be level rather than edge triggered.
>>
>> The following additional patch makes things work for me.  I
>> couldn't tell you if it's the correct thing to do but I can no
>> longer cause the keypad to lock-up by typing too fast.
>
> good good. Looks like IRQF_ONESHOT is what did the trick.
>
> Did you check if IRQF_ONESHOT alone was enough ?

I tried that first, but it didn't fix it, although it makes it a
little bit harder to trigger.  I've just tried again to be sure,
but I got a lock-up quite easily.

Regards,

Leigh.
(Continue reading)

Felipe Balbi | 20 Jun 2011 10:26
Picon
Favicon

Re: [PATCH] input: keypad: lm8323: convert to threaded IRQ

Hi,

On Sun, Jun 19, 2011 at 11:01:43PM +0100, Leigh Brown wrote:
> On Sun, 19 Jun 2011 22:56:06 +0300, Felipe Balbi wrote:
> >Hi,
> >
> >On Sun, Jun 19, 2011 at 07:00:13PM +0000, Leigh Brown wrote:
> >>Many thanks for trying to assist me with my problem. To recap,
> >
> >yeah, no problem ;-)
> >
> >>I'm seeing the keypad lock-up on my N810 using this driver,
> >>when I type quickly.
> >>
> >>I tried your patch, and it doesn't fix the issue.  However, I've
> >>read the datasheet for the lm8323 and it looks to me like the
> >>interrupt should be level rather than edge triggered.
> >>
> >>The following additional patch makes things work for me.  I
> >>couldn't tell you if it's the correct thing to do but I can no
> >>longer cause the keypad to lock-up by typing too fast.
> >
> >good good. Looks like IRQF_ONESHOT is what did the trick.
> >
> >Did you check if IRQF_ONESHOT alone was enough ?
> 
> I tried that first, but it didn't fix it, although it makes it a
> little bit harder to trigger.  I've just tried again to be sure,
> but I got a lock-up quite easily.

(Continue reading)

Leigh Brown | 20 Jun 2011 21:02
Picon

[PATCH] input: keypad: lm8323: use level triggered interrupts

This patch, which should be applied on top of Felipe's
"input: keypad: lm8323: convert to threaded IRQ" patch, fixes the issue
of the Nokia N810 keypad stopping responding if multiple key events 
occur
in quick succession.

Signed-off-by: Leigh Brown <leigh <at> solinno.co.uk>
---
  drivers/input/keyboard/lm8323.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/input/keyboard/lm8323.c 
b/drivers/input/keyboard/lm8323.c
index 3b21f42..ab0acaf 100644
--- a/drivers/input/keyboard/lm8323.c
+++ b/drivers/input/keyboard/lm8323.c
 <at>  <at>  -734,7 +734,7  <at>  <at>  static int __devinit lm8323_probe(struct i2c_client 
*client,
  	}

  	err = request_threaded_irq(client->irq, NULL, lm8323_irq,
-			  IRQF_TRIGGER_FALLING, "lm8323", lm);
+			  IRQF_TRIGGER_LOW|IRQF_ONESHOT, "lm8323", lm);
  	if (err) {
  		dev_err(&client->dev, "could not get IRQ %d\n", client->irq);
  		goto fail4;

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo <at> vger.kernel.org
(Continue reading)

Dmitry Torokhov | 21 Jun 2011 13:26
Picon

Re: [PATCH] input: keypad: lm8323: use level triggered interrupts

On Mon, Jun 20, 2011 at 08:02:27PM +0100, Leigh Brown wrote:
> This patch, which should be applied on top of Felipe's
> "input: keypad: lm8323: convert to threaded IRQ" patch, fixes the issue
> of the Nokia N810 keypad stopping responding if multiple key events
> occur
> in quick succession.
> 
> Signed-off-by: Leigh Brown <leigh <at> solinno.co.uk>

Applied, thanks Leigh.

--

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Dmitry Torokhov | 21 Jun 2011 13:25
Picon

Re: [PATCH] input: keypad: lm8323: convert to threaded IRQ

On Tue, Jun 14, 2011 at 12:16:52AM +0300, Felipe Balbi wrote:
> there's no need for that workqueue anymore.
> Get rid of it and move to threaded IRQs
> instead.
> 
> Signed-off-by: Felipe Balbi <balbi <at> ti.com>

Applied, thanks Felipe.

--

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Gmane