From ff57f2094170ed44a65c37049a60a99d31db0e81 Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Wed, 25 Nov 2020 14:19:38 +0100 Subject: [PATCH 123/351] 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 23964c5c64ff..5a84037f3745 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.34.0