xref: /linux/include/linux/soc/qcom/irq.h (revision 24bce201d79807b668bf9d9e0aca801c5c0d5f78)
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