Getting the IRQ number (Was: Basic driver devel questions ?)

Michael Ellerman michael at ellerman.id.au
Mon Dec 13 08:46:11 EST 2010


On Fri, 2010-12-10 at 17:21 +0100, Guillaume Dargaud wrote:
> Hello all,

> 
> > Also turn on CONFIG_DEBUG_DRIVER and see if that gives you anything
> > interesting.
> 
> I see an unset CONFIG_DEBUG_KERNEL but no CONFIG_DEBUG_DRIVER in the .config of 
> my current kernel. 

Right you'd need to turn on CONFIG_DEBUG_KERNEL first, and then
CONFIG_DEBUG_DRIVER will appear.

> Does it need to be changed in the .config with a full kernel recompilation, or 
> can I still benefit from it in my module only by doing a #define at the begining 
> of my code ? Some #defines like DEBUG seem to work locally on things like 
> dev_dbg but I doubt the CONFIG_* work the same...

No you'd need to rebuild your kernel. DEBUG is the only #define I can
think of that has an effect locally. Using different values for a
CONFIG_ in the kernel vs modules will not work.

> > Er. Not sure sorry. I can't see anything obviously wrong. Maybe post
> > your driver code again.
> 
> Err... I ran it again this morning and it worked farther. I now get into the 
> probe function and can now register my interrupt, yeah!, but I don't see the 
> ISR being called. I'm currently checking if it can be a hardware problem 
> before coming back here for more questions !

Great!

> BTW, is errno/strerror used within the kernel ?

Nope.

cheers


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20101213/baa97c30/attachment.pgp>


More information about the Linuxppc-dev mailing list