support OOB interrupt

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
This commit is contained in:
Icenowy Zheng 2020-02-27 14:25:52 +08:00
parent ab6b5789a6
commit bb8a4961be
2 changed files with 17 additions and 1 deletions

View file

@ -64,7 +64,7 @@ CONFIG_TDLS = n
CONFIG_WIFI_MONITOR = n
######################## Wake On Lan ##########################
CONFIG_WOWLAN = n
CONFIG_GPIO_WAKEUP = n
CONFIG_GPIO_WAKEUP = y
CONFIG_WAKEUP_GPIO_IDX = default
CONFIG_HIGH_ACTIVE = n
CONFIG_PNO_SUPPORT = n

View file

@ -36,6 +36,9 @@
static int wlan_en_gpio = -1;
#endif //CONFIG_PLATFORM_INTEL_BYT
#include <linux/of.h>
#include <linux/of_irq.h>
#ifndef dev_to_sdio_func
#define dev_to_sdio_func(d) container_of(d, struct sdio_func, dev)
#endif
@ -654,6 +657,10 @@ static int rtw_drv_init(
PADAPTER if1 = NULL, if2 = NULL;
struct dvobj_priv *dvobj;
#ifdef CONFIG_OF
struct device_node *np;
#endif
#ifdef CONFIG_PLATFORM_INTEL_BYT
#ifdef CONFIG_ACPI
@ -690,6 +697,15 @@ static int rtw_drv_init(
#endif
#endif //CONFIG_PLATFORM_INTEL_BYT
#if defined(CONFIG_OF)
np = func->dev.of_node;
if (np) {
/* make sure there are interrupts defined in the node */
if (of_find_property(np, "interrupts", NULL)) {
oob_irq = irq_of_parse_and_map(np, 0);
}
}
#endif
RT_TRACE(_module_hci_intfs_c_, _drv_info_,
("+rtw_drv_init: vendor=0x%04x device=0x%04x class=0x%02x\n",