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

    Linux device drivers


    I am new learner of Linux device drivers can any one explain the polling & interrupt driven in device drivers

  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    St. Petersburg, FL
    Basically, a poll-driven driver polls the device at a regular, but very small, interval, to see if there's activity. Interrupt-driven drivers wait for an IRQ from the device and respond accordingly.
    Beyond that basic description, I suggest you get yourself a copy of O'REILLY's Linux Device Drivers -- 3rd Edition.

  3. #3
    this will useful for me

  4. $spacer_open
  5. #4
    In a very simple scenario, you have your code and you have a push button, connecting to a pin on your processor.
    Polling would be the easiest to implement. You continuously (or periodically) read the pin to see if the button was pushed. This will consume more resources and may introduce a delay before your code sees that the button was pressed.
    Using an interrupt will be more work because you need to configure it and write an interrupt service routine (isr). However now your code doesn't need to check the button and no resources are "wasted". Also your isr will be executed the moment the button is pushed.

Posting Permissions

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