summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Bee <knaerzche@gmail.com>2024-06-22 23:54:16 +0200
committerKalle Valo <kvalo@kernel.org>2024-06-26 19:50:58 +0200
commitf3f942d6e5889ea9d46cecf8fc0b7893b5ba9792 (patch)
tree3b24c359de5107c7cec71e3a1877afd7cd710cd9
parentwifi: brcmsmac: advertise MFP_CAPABLE to enable WPA3 (diff)
downloadlinux-f3f942d6e5889ea9d46cecf8fc0b7893b5ba9792.tar.xz
linux-f3f942d6e5889ea9d46cecf8fc0b7893b5ba9792.zip
wifi: brcmfmac: of: Support interrupts-extended
The currently existing of_property_present check for interrupts does not cover all ways interrupts can be defined in a device tree, e.g. "interrupts-extended". In order to support all current and future ways that can be done, drop that check and call of_irq_parse_one to figure out if an interrupt is defined and irq_create_of_mapping for the actual mapping and let it be handled by the interrupt subsystem. Signed-off-by: Alex Bee <knaerzche@gmail.com> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20240622215416.659208-1-knaerzche@gmail.com
-rw-r--r--drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
index e406e11481a6..fe4f65756105 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
@@ -70,6 +70,7 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
{
struct brcmfmac_sdio_pd *sdio = &settings->bus.sdio;
struct device_node *root, *np = dev->of_node;
+ struct of_phandle_args oirq;
const char *prop;
int irq;
int err;
@@ -129,10 +130,10 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
sdio->drive_strength = val;
/* make sure there are interrupts defined in the node */
- if (!of_property_present(np, "interrupts"))
+ if (of_irq_parse_one(np, 0, &oirq))
return;
- irq = irq_of_parse_and_map(np, 0);
+ irq = irq_create_of_mapping(&oirq);
if (!irq) {
brcmf_err("interrupt could not be mapped\n");
return;