PDC is the parent of TLMM to enable wakeup from GPIO. To achieve this, PDC irqchip exports a irqdomain specifically for GPIOS. But not all GPIOs are routed to the PDC. So when a driver requests a GPIO, the TLMM driver must check in its map to see if a corresponding PDC interrupt exits for the GPIO. If it does, TLMM will translate to the PDC interrupt and request an interrupt to be allocated at the PDC. If the GPIO is not mapped to a PDC line, it still has to request the PDC to allocate an interrupt in the irqdomain. This is necessary as PDC alloc will setup the irqchip on the irqdomain. Failing to do so will result in an exception when calling the _set_parent functions on the irqchip. Set up GPIO_NO_WAKE_IRQ as the parent interrupt of a non-wakeup capable GPIOs. Change-Id: I58f1ed0cc6daa50aec2d40bf38c1f645619a1021 Signed-off-by: Lina Iyer <ilina@codeaurora.org>
29 lines
729 B
C
29 lines
729 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (c) 2019, The Linux Foundation. All rights reserved.
|
|
*/
|
|
|
|
#ifndef __QCOM_IRQ_H
|
|
#define __QCOM_IRQ_H
|
|
|
|
#include <linux/irqdomain.h>
|
|
|
|
#define GPIO_NO_WAKE_IRQ ~0U
|
|
|
|
/**
|
|
* struct qcom_irq_fwspec - qcom specific irq fwspec wrapper
|
|
* @fwspec: irq fwspec
|
|
* @mask: if true, keep the irq masked in the gpio controller
|
|
*
|
|
* Use this structure to communicate between the parent irq chip, MPM or PDC,
|
|
* to the gpio chip, TLMM, about the gpio being allocated in the parent
|
|
* and if the gpio chip should keep the line masked because the parent irq
|
|
* chip is handling everything about the irq line.
|
|
*/
|
|
struct qcom_irq_fwspec {
|
|
struct irq_fwspec fwspec;
|
|
bool mask;
|
|
};
|
|
|
|
#endif
|