linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] input: sh_keysc: Switch to threaded IRQ handler
@ 2011-04-21 13:38 Magnus Damm
  2011-04-28  6:29 ` Dmitry Torokhov
  0 siblings, 1 reply; 4+ messages in thread
From: Magnus Damm @ 2011-04-21 13:38 UTC (permalink / raw)
  To: linux-input; +Cc: lethal, Magnus Damm, dmitry.torokhov, simon, linux-sh

From: Magnus Damm <damm@opensource.se>

Update the KEYSC driver to make use of threaded IRQs
with IRQF_ONESHOT.

Also pass dev_name() as string for /proc/interrupts.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 drivers/input/keyboard/sh_keysc.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- 0011/drivers/input/keyboard/sh_keysc.c
+++ work/drivers/input/keyboard/sh_keysc.c	2011-04-21 19:42:33.000000000 +0900
@@ -231,7 +231,8 @@ static int __devinit sh_keysc_probe(stru
 	input->keycodesize = sizeof(pdata->keycodes[0]);
 	input->keycodemax = ARRAY_SIZE(pdata->keycodes);
 
-	error = request_irq(irq, sh_keysc_isr, 0, pdev->name, pdev);
+	error = request_threaded_irq(irq, NULL, sh_keysc_isr, IRQF_ONESHOT,
+				     dev_name(&pdev->dev), pdev);
 	if (error) {
 		dev_err(&pdev->dev, "failed to request IRQ\n");
 		goto err3;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] input: sh_keysc: Switch to threaded IRQ handler
  2011-04-21 13:38 [PATCH] input: sh_keysc: Switch to threaded IRQ handler Magnus Damm
@ 2011-04-28  6:29 ` Dmitry Torokhov
  2011-04-28  6:46   ` Magnus Damm
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Torokhov @ 2011-04-28  6:29 UTC (permalink / raw)
  To: Magnus Damm; +Cc: linux-input, lethal, simon, linux-sh

On Thu, Apr 21, 2011 at 10:38:24PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm@opensource.se>
> 
> Update the KEYSC driver to make use of threaded IRQs
> with IRQF_ONESHOT.
> 

Explanation of why this is needed is missing.

Thanks.

> Also pass dev_name() as string for /proc/interrupts.
> 
> Signed-off-by: Magnus Damm <damm@opensource.se>
> ---
> 
>  drivers/input/keyboard/sh_keysc.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> --- 0011/drivers/input/keyboard/sh_keysc.c
> +++ work/drivers/input/keyboard/sh_keysc.c	2011-04-21 19:42:33.000000000 +0900
> @@ -231,7 +231,8 @@ static int __devinit sh_keysc_probe(stru
>  	input->keycodesize = sizeof(pdata->keycodes[0]);
>  	input->keycodemax = ARRAY_SIZE(pdata->keycodes);
>  
> -	error = request_irq(irq, sh_keysc_isr, 0, pdev->name, pdev);
> +	error = request_threaded_irq(irq, NULL, sh_keysc_isr, IRQF_ONESHOT,
> +				     dev_name(&pdev->dev), pdev);
>  	if (error) {
>  		dev_err(&pdev->dev, "failed to request IRQ\n");
>  		goto err3;

-- 
Dmitry

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] input: sh_keysc: Switch to threaded IRQ handler
  2011-04-28  6:29 ` Dmitry Torokhov
@ 2011-04-28  6:46   ` Magnus Damm
  2011-04-28  7:03     ` Dmitry Torokhov
  0 siblings, 1 reply; 4+ messages in thread
From: Magnus Damm @ 2011-04-28  6:46 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input, lethal, simon, linux-sh

On Thu, Apr 28, 2011 at 3:29 PM, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> On Thu, Apr 21, 2011 at 10:38:24PM +0900, Magnus Damm wrote:
>> From: Magnus Damm <damm@opensource.se>
>>
>> Update the KEYSC driver to make use of threaded IRQs
>> with IRQF_ONESHOT.
>>
>
> Explanation of why this is needed is missing.
>
> Thanks.

Sorry for not giving you a more complete commit message.

The reason for this change is to improve interrupt latency. This
driver is using udelay() in the ISR to make sure the hardware has
stabilized. Without using interrupt threads this delay may affect the
latency of the rest of the system.

Would you like me to resend a V2?

Thanks,

/ magnus

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] input: sh_keysc: Switch to threaded IRQ handler
  2011-04-28  6:46   ` Magnus Damm
@ 2011-04-28  7:03     ` Dmitry Torokhov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2011-04-28  7:03 UTC (permalink / raw)
  To: Magnus Damm; +Cc: linux-input, lethal, simon, linux-sh

On Thu, Apr 28, 2011 at 03:46:16PM +0900, Magnus Damm wrote:
> On Thu, Apr 28, 2011 at 3:29 PM, Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
> > On Thu, Apr 21, 2011 at 10:38:24PM +0900, Magnus Damm wrote:
> >> From: Magnus Damm <damm@opensource.se>
> >>
> >> Update the KEYSC driver to make use of threaded IRQs
> >> with IRQF_ONESHOT.
> >>
> >
> > Explanation of why this is needed is missing.
> >
> > Thanks.
> 
> Sorry for not giving you a more complete commit message.
> 
> The reason for this change is to improve interrupt latency. This
> driver is using udelay() in the ISR to make sure the hardware has
> stabilized. Without using interrupt threads this delay may affect the
> latency of the rest of the system.
> 
> Would you like me to resend a V2?

No, I'll just put the above in.

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-04-28  7:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-21 13:38 [PATCH] input: sh_keysc: Switch to threaded IRQ handler Magnus Damm
2011-04-28  6:29 ` Dmitry Torokhov
2011-04-28  6:46   ` Magnus Damm
2011-04-28  7:03     ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).