Getting the IRQ number (Was: Basic driver devel questions ?)
Guillaume Dargaud
dargaud at lpsc.in2p3.fr
Sat Dec 11 03:21:03 EST 2010
Hello all,
> Are you sure that you want to have the chrdev registration here (the
> following code)?
It was commented out in my lastest attempts after reading Michael's
explainations.
> Such stuff typically goes into the probe() function. The modules's
> init() just registers the driver. Furthermore your global variables
> prohibit having more than one device instance using the driver.
Only one such device will ever be build, so don't expect a mainline kernel
patch from me anytime soon ! C;-)
> 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.
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...
> 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 !
BTW, is errno/strerror used within the kernel ?
Thanks all.
--
Guillaume Dargaud
http://www.gdargaud.net/
More information about the Linuxppc-dev
mailing list