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
4949 * IRQ_TYPE_LEVEL_LOW - low level triggered
5050 * IRQ_TYPE_LEVEL_MASK - Mask to filter out the level bits
5151 * 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+ *
5258 * IRQ_TYPE_PROBE - Special flag for probing in progress
5359 *
5460 * Bits which can be modified via irq_set/clear/modify_status_flags()
@@ -77,6 +83,7 @@ enum { · 22 unmodified lines
7783 IRQ_TYPE_LEVEL_LOW = 0x00000008,
7884 IRQ_TYPE_LEVEL_MASK = (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH),
7985 IRQ_TYPE_SENSE_MASK = 0x0000000f,
86+ IRQ_TYPE_DEFAULT = IRQ_TYPE_SENSE_MASK,
8087
8188 IRQ_TYPE_PROBE = 0x00000010,
8289