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