From: Scott Wood <scottwood@freescale.com>
To: Yoni Levin <yoni.l@slyde-tech.com>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: GPIO interrupts on mpc8313e
Date: Thu, 02 Aug 2007 10:18:57 -0500 [thread overview]
Message-ID: <46B1F5E1.6000301@freescale.com> (raw)
In-Reply-To: <9299F00F70CC4A0EBD33A4EB9E95D9D2.MAI@mail.livedns.co.il>
Yoni Levin wrote:
> Yes, I removed the flag (0) and nothing change in both cases the request_irq
> return 0 which is good.
> Then I added enable_irq and I recived :
>
> Unbalanced enable for IRQ 74
Yeah, sorry, I misremembered what IRQF_DISABLED does. As Domen pointed
out, you need to pass myirq, not 74, to request_irq().
> void CreateGPIOHandler()
> {
>
> unsigned int myirq=irq_create_mapping(NULL,74);
> enable_irq(74);
> printk("myirq is : %d \n",myirq);
> int ret;
>
> ret=- request_irq(74, GPIOinterrupt_handler,0, "GPIO", NULL);
> printk("ret is : %d \n",ret);
>
>
> }
Even if IRQF_DISABLED did do what I thought it did (I was thinking of
IRQ_NOAUTOEN, which is apparently an ARM-only thing), you should never
call enable_irq() before request_irq(), or without previously disabling
it (either explicitly or via IRQ_NOAUTOEN).
-Scott
next prev parent reply other threads:[~2007-08-02 15:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-01 11:45 GPIO interrupts on mpc8313e Yoni Levin
2007-08-01 16:26 ` Florian A. Voegel
2007-08-01 18:36 ` Scott Wood
2007-08-02 6:11 ` Domen Puncer
2007-08-02 8:37 ` Yoni Levin
2007-08-02 15:18 ` Scott Wood [this message]
2007-08-02 15:38 ` Yoni Levin
2007-08-02 15:40 ` Scott Wood
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=46B1F5E1.6000301@freescale.com \
--to=scottwood@freescale.com \
--cc=linuxppc-embedded@ozlabs.org \
--cc=yoni.l@slyde-tech.com \
/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;
as well as URLs for NNTP newsgroup(s).