xref: /linux/include/linux/soc/qcom/irq.h (revision 26fbb4c8c7c3ee9a4c3b4de555a8587b5a19154e)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef __QCOM_IRQ_H
4 #define __QCOM_IRQ_H
5 
6 #include <linux/irqdomain.h>
7 
8 #define GPIO_NO_WAKE_IRQ	~0U
9 
10 /**
11  * QCOM specific IRQ domain flags that distinguishes the handling of wakeup
12  * capable interrupts by different interrupt controllers.
13  *
14  * IRQ_DOMAIN_FLAG_QCOM_PDC_WAKEUP: Line must be masked at TLMM and the
15  *                                  interrupt configuration is done at PDC
16  * IRQ_DOMAIN_FLAG_QCOM_MPM_WAKEUP: Interrupt configuration is handled at TLMM
17  */
18 #define IRQ_DOMAIN_FLAG_QCOM_PDC_WAKEUP		(IRQ_DOMAIN_FLAG_NONCORE << 0)
19 #define IRQ_DOMAIN_FLAG_QCOM_MPM_WAKEUP		(IRQ_DOMAIN_FLAG_NONCORE << 1)
20 
21 /**
22  * irq_domain_qcom_handle_wakeup: Return if the domain handles interrupt
23  *                                configuration
24  * @d: irq domain
25  *
26  * This QCOM specific irq domain call returns if the interrupt controller
27  * requires the interrupt be masked at the child interrupt controller.
28  */
29 static inline bool irq_domain_qcom_handle_wakeup(const struct irq_domain *d)
30 {
31 	return (d->flags & IRQ_DOMAIN_FLAG_QCOM_PDC_WAKEUP);
32 }
33 
34 #endif
35