From: Vijay Nikam <vijay.t.nikam@gmail.com>
To: linuxppc-dev@ozlabs.org
Subject: request_irq return errno 38
Date: Wed, 11 Feb 2009 14:13:26 +0530 [thread overview]
Message-ID: <f234e2140902110043i5a4aefb5yb635bc32b9653943@mail.gmail.com> (raw)
Hello All,
I have mpc8313erdb evaluation board and currently I am writing GPIO
driver. Actually it is just simple test driver.
I did the irq_request in the driver init function, as request_irq
returns zero (0) if successful, otherwise -1 on error and errno
indicates the error. But when I load or insert the module using insmod
request_irq return with Return Value -38. I checked in errno.h file in
asm-generic and 38 means ENOSYS - Function not implemented.
Following is irq_request code:
----------------------
ret = request_irq(74, interrupt_handler, SA_INTERRUPT | SA_SHIRQ ,
"gpio", &mydev);
if(ret)
printk(KERN_INFO "Error in request_irq, value return = %d \n", ret);
----------------------
NOTE: 74 is the Interrupt ID Number for GPIO Interrupt. this
information is from Processor User Manual.
Following is the handler:
---------------------
static int interrupt_handler(int irqn, void *dev_id)
{
printk(KERN_INFO "Enter in interrupt handler\n");
return IRQ_HANDLED;
}
--------------------
Usually request_irq return EBUSY, EINVAL but in my case it returns
ENOSYS (errno 38). I tried to look information for this errno in
interrupt context but could not able to find anything useful or
understable. Could anyone please let me know why this specific errno
38 generated in request_irq ? ? ? and what are the possiblities for
resolving this error ? ? ?
Kindly please acknowledge ... thank you ...
Kind Regards,
Vijay Nikam
next reply other threads:[~2009-02-11 8:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-11 8:43 Vijay Nikam [this message]
2009-02-11 9:15 ` request_irq return errno 38 Michael Ellerman
2009-02-11 9:41 ` Vijay Nikam
2009-02-11 9:54 ` Michael Ellerman
2009-02-11 10:13 ` Vijay Nikam
2009-02-11 22:35 ` Brad Boyer
2009-02-12 6:01 ` Benjamin Herrenschmidt
2009-02-12 10:51 ` Vijay Nikam
2009-02-12 16:39 ` Timur Tabi
2009-02-12 22:49 ` David Gibson
2009-02-11 22:48 ` 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=f234e2140902110043i5a4aefb5yb635bc32b9653943@mail.gmail.com \
--to=vijay.t.nikam@gmail.com \
--cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).