lkml.org 
[lkml]   [2008]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectSet_up irq problem while using gpio
Hi,

I have query that the below patch has to applied on irq/manage.c file or not.
--- kernel_old/irq/manage.c 2008-02-07 22:11:14.000000000 +0530
+++ kernel_new/irq/manage.c 2008-02-07 22:19:14.000000000 +0530
@@ -349,8 +349,14 @@
/* Setup the type (level, edge polarity) if configured: */
if (new->flags & IRQF_TRIGGER_MASK) {
if (desc->chip && desc->chip->set_type)
- desc->chip->set_type(irq,
- new->flags & IRQF_TRIGGER_MASK);
+ {
+ if((desc->chip->set_type(irq,
+ new->flags & IRQF_TRIGGER_MASK)))
+ {
+ spin_unlock_irqrestore(&desc->lock, flags);
+ return -ESPIPE;
+ }
+ }
else
/*
* IRQF_TRIGGER_* but the PIC does not support
The reason is that in case of gpio pins used as interrupt pin but that
pin has already been ocuupied in other mode (like alternate function
mode or in software mode) by other device. In that case, some error
mechanism must be there, if we are requesting that gpio pin as
interrupt through request_irq function.

Regards
Sasa


\
 
 \ /
  Last update: 2008-07-15 08:07    [W:0.047 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site