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.
Showing the changes to include/linux (1 of 1 file). Show all
Unified · Split
| @@ -49,6 +49,12 @@ typedef void (*irq_preflow_handler_t)(struct irq_data *data); · 48 unmodified lines | ||
| 49 | 49 | * IRQ_TYPE_LEVEL_LOW - low level triggered |
| 50 | 50 | * IRQ_TYPE_LEVEL_MASK - Mask to filter out the level bits |
| 51 | 51 | * 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 | 58 | * IRQ_TYPE_PROBE - Special flag for probing in progress |
| 53 | 59 | * |
| 54 | 60 | * Bits which can be modified via irq_set/clear/modify_status_flags() |
| @@ -77,6 +83,7 @@ enum { · 22 unmodified lines | ||
| 77 | 83 | IRQ_TYPE_LEVEL_LOW = 0x00000008, |
| 78 | 84 | IRQ_TYPE_LEVEL_MASK = (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH), |
| 79 | 85 | IRQ_TYPE_SENSE_MASK = 0x0000000f, |
| 86 | + IRQ_TYPE_DEFAULT = IRQ_TYPE_SENSE_MASK, | |
| 80 | 87 | |
| 81 | 88 | IRQ_TYPE_PROBE = 0x00000010, |
| 82 | 89 | |