Getting the IRQ number (Was: Basic driver devel questions ?)
Philipp Ittershagen
lists at gate-nine.de
Thu Dec 2 05:29:53 EST 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 12/01/2010 05:35 PM, Guillaume Dargaud wrote:
> Now how do I connect the dots between the hardware definitions from the dts and
> my driver ?
You can get the interrupt number from the dt by calling
irq_of_parse_and_map(). Be sure to pass the node of your device to this
function.
Then you have to request the interrupt by calling request_irq. This is
where you specify the interrupt handler.
> But first I'm not sure where to find the IRQ in there, and also I'm not sure if
> reading the filesystem from a module is allowed.
Why do you want to read the file system?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkz2lCEACgkQCG4q0RxCsY4GpgCgiQFRhiF7jjhUdZcUBc4Y5ScJ
E0AAn0VxcCaVexepjrah64ZSS+Xhbed8
=h97e
-----END PGP SIGNATURE-----
More information about the Linuxppc-dev
mailing list