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

    Execution flow of device driver

    hai friend,
    I am new to driver programming. I want to develop a device driver program in Linux.Anyone help me How to start and give the short description about the flow of device driver works(i.e. which routine calls first and which routine calls next,like that..)
    Thanks in advance.
    with regards

  2. #2
    Take a sample device driver and use printk messages in each function/syscall like read/write/open/close.

    Flow of execution will shown in #dmesg

  3. #3
    Hi Vivek,..

    There is no compulsory program flow in a device driver like a normal c program. According to the calls, the respective functions will get invoked. First while inserting the module the INIT_MODULE will get called. Then if you try to read from a device the READ function will get invoked. You can write a driver without a READ call also. It will have only have WRITE function to write into some device.

    Still if want to know about the program flow means you can use $ : strace <filename>


  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