mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "sasa sasa" <sasak.1983@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Set_up irq problem while using gpio
Date: Tue, 15 Jul 2008 11:34:23 +0530	[thread overview]
Message-ID: <aecf5e530807142304m60ef0cb2pe1c3592ae1abc7eb@mail.gmail.com> (raw)

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

             reply	other threads:[~2008-07-15  6:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-15  6:04 sasa sasa [this message]
2008-07-15 12:32 ` Ben Dooks
2008-07-16  4:08   ` sasa sasa
2008-07-17  9:20     ` [BUG]Set_up " sasa sasa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aecf5e530807142304m60ef0cb2pe1c3592ae1abc7eb@mail.gmail.com \
    --to=sasak.1983@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®