Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Interfacing to custom driver module

    I have to develop a driver for a custom FPGA we are developing. I'm cross compiling for an ARM processor (AT91SAM9G20 using uCLinux 2.6.30), but I think my question applies to Linux drivers generally.

    I can compile and run a simple driver module (built-in to the kernel tree) which does nothing more than to printk a message. Now I want to write some interface routines to allow my application to communicate with the FPGA. I have to initially load the FPGA and then read and write to registers.

    Where do I put these interface routines? In the driver module itself? And, how do I compile the module to allow the application to link to the interface routines.

    Am I looking at this in the wrong way altogether?

    I have done some background reading (mainly the first half of Linux Device Drivers by Corbet).


  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    More kernel module interfacing is via ioctl calls, though you can also implement standard I/O functions such as read(), write(), open(), etc. As I have mentioned many times in the past, there is adequate documentation how to do this at:

    The Linux Documentation Project
    The Linux Kernel Archives

    There are also some free downloadable, but normally commercial, books on the subject of Linux kernel module development. O'Reilly has some that are quite useful.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    OK, thanks.
    Yes, I've been reading Linux Device Drivers and things are gradually beginning to make some sense. As for documentation, fair enough, but it's not always obvious to newbies where the documents are to be found and not always obvious what search terms to use, which is why people like you are really useful to have around

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts