History

irq: Add IRQ_TYPE_DEFAULT for use by PIC drivers

This is meant typically to allow a PIC driver's irq domain map() callback to establish sane defaults for the interrupt (and make sure that the HW and the irq_desc are in sync as far as the trigger is concerned). The irq core may not call the set_trigger callback if it thinks the trigger is already set to the right setting, so we need to ensure new descriptors are properly synchronized with the hardware.

Benjamin Herrenschmidt committed 14 years ago

Commit 3fca40c1 parent 3a2b4f71 file · +7 −0Browse files

Showing the changes to include/linux (1 of 1 file). Show all

Unified · Split

include/linux/irq.h+7−0
@@ -49,6 +49,12 @@ typedef void (*irq_preflow_handler_t)(struct irq_data *data); · 48 unmodified lines
49 * IRQ_TYPE_LEVEL_LOW - low level triggered49 * IRQ_TYPE_LEVEL_LOW - low level triggered
50 * IRQ_TYPE_LEVEL_MASK - Mask to filter out the level bits50 * IRQ_TYPE_LEVEL_MASK - Mask to filter out the level bits
51 * IRQ_TYPE_SENSE_MASK - Mask for all the above bits51 * IRQ_TYPE_SENSE_MASK - Mask for all the above bits
52 * IRQ_TYPE_DEFAULT - For use by some PICs to ask irq_set_type
53 * to setup the HW to a sane default (used
54 * by irqdomain map() callbacks to synchronize
55 * the HW state and SW flags for a newly
56 * allocated descriptor).
57 *
52 * IRQ_TYPE_PROBE - Special flag for probing in progress58 * IRQ_TYPE_PROBE - Special flag for probing in progress
53 *59 *
54 * Bits which can be modified via irq_set/clear/modify_status_flags()60 * Bits which can be modified via irq_set/clear/modify_status_flags()
@@ -77,6 +83,7 @@ enum { · 22 unmodified lines
77 IRQ_TYPE_LEVEL_LOW = 0x00000008,83 IRQ_TYPE_LEVEL_LOW = 0x00000008,
78 IRQ_TYPE_LEVEL_MASK = (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH),84 IRQ_TYPE_LEVEL_MASK = (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH),
79 IRQ_TYPE_SENSE_MASK = 0x0000000f,85 IRQ_TYPE_SENSE_MASK = 0x0000000f,
86 IRQ_TYPE_DEFAULT = IRQ_TYPE_SENSE_MASK,
80 87
81 IRQ_TYPE_PROBE = 0x00000010,88 IRQ_TYPE_PROBE = 0x00000010,
82 89