From b9a91f54d523041bd17f8e05e220915c7d7f60b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= Date: Wed, 25 Nov 2020 14:19:38 +0100 Subject: [PATCH 117/391] 8723cs: Enable OOB interrupt Patch ported from Icenowy Signed-off-by: Ondrej Jirman --- .../staging/rtl8723cs/os_dep/linux/sdio_intf.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8723cs/os_dep/linux/sdio_intf.c b/drivers/staging/rtl8723cs/os_dep/linux/sdio_intf.c index 23964c5c6..5a84037f3 100644 --- a/drivers/staging/rtl8723cs/os_dep/linux/sdio_intf.c +++ b/drivers/staging/rtl8723cs/os_dep/linux/sdio_intf.c @@ -18,6 +18,9 @@ #include #include +#include +#include + #ifndef CONFIG_SDIO_HCI #error "CONFIG_SDIO_HCI shall be on!\n" #endif @@ -989,6 +992,9 @@ static int rtw_drv_init( #endif PADAPTER padapter = NULL; struct dvobj_priv *dvobj; +#ifdef CONFIG_OF + struct device_node *np; +#endif #ifdef CONFIG_PLATFORM_INTEL_BYT @@ -996,7 +1002,6 @@ static int rtw_drv_init( acpi_handle handle; struct acpi_device *adev; #endif - #if defined(CONFIG_ACPI) && defined(CONFIG_GPIO_WAKEUP) handle = ACPI_HANDLE(&func->dev); @@ -1024,7 +1029,14 @@ static int rtw_drv_init( #endif #endif /* CONFIG_PLATFORM_INTEL_BYT */ - +#ifdef 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 dvobj = sdio_dvobj_init(func, id); if (dvobj == NULL) { -- 2.35.3