|
@@ -210,6 +210,7 @@ struct irq_data {
|
|
* IRQD_MANAGED_SHUTDOWN - Interrupt was shutdown due to empty affinity
|
|
* IRQD_MANAGED_SHUTDOWN - Interrupt was shutdown due to empty affinity
|
|
* mask. Applies only to affinity managed irqs.
|
|
* mask. Applies only to affinity managed irqs.
|
|
* IRQD_SINGLE_TARGET - IRQ allows only a single affinity target
|
|
* IRQD_SINGLE_TARGET - IRQ allows only a single affinity target
|
|
|
|
+ * IRQD_DEFAULT_TRIGGER_SET - Expected trigger already been set
|
|
*/
|
|
*/
|
|
enum {
|
|
enum {
|
|
IRQD_TRIGGER_MASK = 0xf,
|
|
IRQD_TRIGGER_MASK = 0xf,
|
|
@@ -230,6 +231,7 @@ enum {
|
|
IRQD_IRQ_STARTED = (1 << 22),
|
|
IRQD_IRQ_STARTED = (1 << 22),
|
|
IRQD_MANAGED_SHUTDOWN = (1 << 23),
|
|
IRQD_MANAGED_SHUTDOWN = (1 << 23),
|
|
IRQD_SINGLE_TARGET = (1 << 24),
|
|
IRQD_SINGLE_TARGET = (1 << 24),
|
|
|
|
+ IRQD_DEFAULT_TRIGGER_SET = (1 << 25),
|
|
};
|
|
};
|
|
|
|
|
|
#define __irqd_to_state(d) ACCESS_PRIVATE((d)->common, state_use_accessors)
|
|
#define __irqd_to_state(d) ACCESS_PRIVATE((d)->common, state_use_accessors)
|
|
@@ -259,18 +261,25 @@ static inline void irqd_mark_affinity_was_set(struct irq_data *d)
|
|
__irqd_to_state(d) |= IRQD_AFFINITY_SET;
|
|
__irqd_to_state(d) |= IRQD_AFFINITY_SET;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static inline bool irqd_trigger_type_was_set(struct irq_data *d)
|
|
|
|
+{
|
|
|
|
+ return __irqd_to_state(d) & IRQD_DEFAULT_TRIGGER_SET;
|
|
|
|
+}
|
|
|
|
+
|
|
static inline u32 irqd_get_trigger_type(struct irq_data *d)
|
|
static inline u32 irqd_get_trigger_type(struct irq_data *d)
|
|
{
|
|
{
|
|
return __irqd_to_state(d) & IRQD_TRIGGER_MASK;
|
|
return __irqd_to_state(d) & IRQD_TRIGGER_MASK;
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|
|
- * Must only be called inside irq_chip.irq_set_type() functions.
|
|
|
|
|
|
+ * Must only be called inside irq_chip.irq_set_type() functions or
|
|
|
|
+ * from the DT/ACPI setup code.
|
|
*/
|
|
*/
|
|
static inline void irqd_set_trigger_type(struct irq_data *d, u32 type)
|
|
static inline void irqd_set_trigger_type(struct irq_data *d, u32 type)
|
|
{
|
|
{
|
|
__irqd_to_state(d) &= ~IRQD_TRIGGER_MASK;
|
|
__irqd_to_state(d) &= ~IRQD_TRIGGER_MASK;
|
|
__irqd_to_state(d) |= type & IRQD_TRIGGER_MASK;
|
|
__irqd_to_state(d) |= type & IRQD_TRIGGER_MASK;
|
|
|
|
+ __irqd_to_state(d) |= IRQD_DEFAULT_TRIGGER_SET;
|
|
}
|
|
}
|
|
|
|
|
|
static inline bool irqd_is_level_type(struct irq_data *d)
|
|
static inline bool irqd_is_level_type(struct irq_data *d)
|