Skip to contentSkip to conversation

input: sh_keysc: Switch to threaded IRQ handler

PATCH In review Magnus Damm 2 participants 4 messages Apr 21, 2011 – Apr 28, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 input: sh_keysc: Switch to threaded IRQ handler

From: Magnus Damm <[email protected]>

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

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

---

 drivers/input/keyboard/sh_keysc.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/input/keyboard/sh_keysc.c +2 -1
@@ -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;
maintainer
#1 lore raw
Quoted 5 lines · Magnus Damm

From: Magnus Damm <[email protected]>

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

Explanation of why this is needed is missing.

Thanks.

Quoted 20 lines

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

---

 drivers/input/keyboard/sh_keysc.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/input/keyboard/sh_keysc.c +2 -1
@@ -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;
Signature · 1 line
Dmitry
#2 lore raw
Quoted 10 lines · Dmitry Torokhov
Quoted 5 lines · Magnus Damm

From: Magnus Damm <[email protected]>

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

maintainer
#3 lore raw
Quoted 13 lines · Magnus Damm
Quoted 10 lines · Dmitry Torokhov
Quoted 5 lines · Magnus Damm

From: Magnus Damm <[email protected]>

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

Explanation of why this is needed is missing.

Thanks.

Quoted 8 lines

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.

Signature · 1 line
Dmitry