Message ID | 20221008025150.10734-3-lvjianmin@loongson.cn (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | irqchip: Support to set irq type for ACPI path | expand |
diff --git a/drivers/irqchip/irq-loongson-liointc.c b/drivers/irqchip/irq-loongson-liointc.c index 0da8716f8f24..838c8fa2d868 100644 --- a/drivers/irqchip/irq-loongson-liointc.c +++ b/drivers/irqchip/irq-loongson-liointc.c @@ -167,7 +167,12 @@ static int liointc_domain_xlate(struct irq_domain *d, struct device_node *ctrlr, if (WARN_ON(intsize < 1)) return -EINVAL; *out_hwirq = intspec[0] - GSI_MIN_CPU_IRQ; - *out_type = IRQ_TYPE_NONE; + + if (intsize > 1) + *out_type = intspec[1] & IRQ_TYPE_SENSE_MASK; + else + *out_type = IRQ_TYPE_NONE; + return 0; }
For ACPI path, the xlate callback used IRQ_TYPE_NONE and ignored the irq type in intspec[1]. For supporting to set type for irqs of the irqdomain, intspec[1] should be used to get irq type. Signed-off-by: Jianmin Lv <lvjianmin@loongson.cn> --- drivers/irqchip/irq-loongson-liointc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)