181ef8bf8SLina Iyer /* SPDX-License-Identifier: GPL-2.0-only */ 281ef8bf8SLina Iyer 381ef8bf8SLina Iyer #ifndef __QCOM_IRQ_H 481ef8bf8SLina Iyer #define __QCOM_IRQ_H 581ef8bf8SLina Iyer 681ef8bf8SLina Iyer #include <linux/irqdomain.h> 781ef8bf8SLina Iyer 881ef8bf8SLina Iyer #define GPIO_NO_WAKE_IRQ ~0U 981ef8bf8SLina Iyer 10*8058dfa0SLukas Bulwahn /* 1181ef8bf8SLina Iyer * QCOM specific IRQ domain flags that distinguishes the handling of wakeup 1281ef8bf8SLina Iyer * capable interrupts by different interrupt controllers. 1381ef8bf8SLina Iyer * 1481ef8bf8SLina Iyer * IRQ_DOMAIN_FLAG_QCOM_PDC_WAKEUP: Line must be masked at TLMM and the 1581ef8bf8SLina Iyer * interrupt configuration is done at PDC 1681ef8bf8SLina Iyer * IRQ_DOMAIN_FLAG_QCOM_MPM_WAKEUP: Interrupt configuration is handled at TLMM 1781ef8bf8SLina Iyer */ 1881ef8bf8SLina Iyer #define IRQ_DOMAIN_FLAG_QCOM_PDC_WAKEUP (IRQ_DOMAIN_FLAG_NONCORE << 0) 1981ef8bf8SLina Iyer #define IRQ_DOMAIN_FLAG_QCOM_MPM_WAKEUP (IRQ_DOMAIN_FLAG_NONCORE << 1) 2081ef8bf8SLina Iyer 21e35a6ae0SLina Iyer /** 22e35a6ae0SLina Iyer * irq_domain_qcom_handle_wakeup: Return if the domain handles interrupt 23e35a6ae0SLina Iyer * configuration 24e35a6ae0SLina Iyer * @d: irq domain 25e35a6ae0SLina Iyer * 26e35a6ae0SLina Iyer * This QCOM specific irq domain call returns if the interrupt controller 27e35a6ae0SLina Iyer * requires the interrupt be masked at the child interrupt controller. 28e35a6ae0SLina Iyer */ irq_domain_qcom_handle_wakeup(const struct irq_domain * d)29e35a6ae0SLina Iyerstatic inline bool irq_domain_qcom_handle_wakeup(const struct irq_domain *d) 30e35a6ae0SLina Iyer { 31e35a6ae0SLina Iyer return (d->flags & IRQ_DOMAIN_FLAG_QCOM_PDC_WAKEUP); 32e35a6ae0SLina Iyer } 33e35a6ae0SLina Iyer 3481ef8bf8SLina Iyer #endif 35