Find the answer to your Linux question:
Results 1 to 3 of 3
Hello: Can we register two different interrupt service routines (for different driver code) with one interrupt line? Is this supported by linux, and how would it be done? What if ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2006
    Posts
    27

    Two ISRs for one Interrupt


    Hello:

    Can we register two different interrupt service routines (for different driver code) with one interrupt line?

    Is this supported by linux, and how would it be done? What if anything should I worry about.

    Thanks,
    B

  2. #2
    Linux Newbie
    Join Date
    Mar 2008
    Location
    Hyderabad
    Posts
    109
    Yes we can do. This is done if they share the irq line between them.

    request_irq(unsigned int irq , irq_handler_t handler,
    unsigned long flags , const char * name, void * device_id);

    Check for the kernel version you r using. For 2.6.24 IRQF_SHARED flag is used. Both the drivers should give this flag. In older 2.6 kernels SA_SHIRQ flag was used.
    The line is freed only when all the drivers sharing the irq frees them.

  3. #3
    Just Joined!
    Join Date
    Jun 2006
    Posts
    29
    thats right flag should be set to SA_SHIRQ and dev_id must be unique for these two, dont use NULL.

Posting Permissions

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