Subversion Repositories Kolibri OS

Rev

Rev 6102 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. /* interrupt.h */
  2. #ifndef _LINUX_INTERRUPT_H
  3. #define _LINUX_INTERRUPT_H
  4.  
  5. #include <linux/kernel.h>
  6. #include <linux/bitops.h>
  7. #include <linux/irqreturn.h>
  8. #include <linux/kref.h>
  9. #include <linux/atomic.h>
  10. /*
  11.  * These correspond to the IORESOURCE_IRQ_* defines in
  12.  * linux/ioport.h to select the interrupt line behaviour.  When
  13.  * requesting an interrupt without specifying a IRQF_TRIGGER, the
  14.  * setting should be assumed to be "as already configured", which
  15.  * may be as per machine or firmware initialisation.
  16.  */
  17. #define IRQF_TRIGGER_NONE       0x00000000
  18. #define IRQF_TRIGGER_RISING     0x00000001
  19. #define IRQF_TRIGGER_FALLING    0x00000002
  20. #define IRQF_TRIGGER_HIGH       0x00000004
  21. #define IRQF_TRIGGER_LOW        0x00000008
  22. #define IRQF_TRIGGER_MASK       (IRQF_TRIGGER_HIGH | IRQF_TRIGGER_LOW | \
  23.                                  IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)
  24. #define IRQF_TRIGGER_PROBE      0x00000010
  25.  
  26. /*
  27.  * These flags used only by the kernel as part of the
  28.  * irq handling routines.
  29.  *
  30.  * IRQF_SHARED - allow sharing the irq among several devices
  31.  * IRQF_PROBE_SHARED - set by callers when they expect sharing mismatches to occur
  32.  * IRQF_TIMER - Flag to mark this interrupt as timer interrupt
  33.  * IRQF_PERCPU - Interrupt is per cpu
  34.  * IRQF_NOBALANCING - Flag to exclude this interrupt from irq balancing
  35.  * IRQF_IRQPOLL - Interrupt is used for polling (only the interrupt that is
  36.  *                registered first in an shared interrupt is considered for
  37.  *                performance reasons)
  38.  * IRQF_ONESHOT - Interrupt is not reenabled after the hardirq handler finished.
  39.  *                Used by threaded interrupts which need to keep the
  40.  *                irq line disabled until the threaded handler has been run.
  41.  * IRQF_NO_SUSPEND - Do not disable this IRQ during suspend.  Does not guarantee
  42.  *                   that this interrupt will wake the system from a suspended
  43.  *                   state.  See Documentation/power/suspend-and-interrupts.txt
  44.  * IRQF_FORCE_RESUME - Force enable it on resume even if IRQF_NO_SUSPEND is set
  45.  * IRQF_NO_THREAD - Interrupt cannot be threaded
  46.  * IRQF_EARLY_RESUME - Resume IRQ early during syscore instead of at device
  47.  *                resume time.
  48.  * IRQF_COND_SUSPEND - If the IRQ is shared with a NO_SUSPEND user, execute this
  49.  *                interrupt handler after suspending interrupts. For system
  50.  *                wakeup devices users need to implement wakeup detection in
  51.  *                their interrupt handlers.
  52.  */
  53. #define IRQF_SHARED             0x00000080
  54. #define IRQF_PROBE_SHARED       0x00000100
  55. #define __IRQF_TIMER            0x00000200
  56. #define IRQF_PERCPU             0x00000400
  57. #define IRQF_NOBALANCING        0x00000800
  58. #define IRQF_IRQPOLL            0x00001000
  59. #define IRQF_ONESHOT            0x00002000
  60. #define IRQF_NO_SUSPEND         0x00004000
  61. #define IRQF_FORCE_RESUME       0x00008000
  62. #define IRQF_NO_THREAD          0x00010000
  63. #define IRQF_EARLY_RESUME       0x00020000
  64. #define IRQF_COND_SUSPEND       0x00040000
  65.  
  66. #define IRQF_TIMER              (__IRQF_TIMER | IRQF_NO_SUSPEND | IRQF_NO_THREAD)
  67.  
  68. extern int early_irq_init(void);
  69. extern int arch_probe_nr_irqs(void);
  70. extern int arch_early_irq_init(void);
  71.  
  72. #endif
  73.