From: Arend van Spriel <arend@broadcom.com>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
Arend van Spriel <arend@broadcom.com>
Subject: [PATCH 1/6] brcmfmac: allow device tree node without 'interrupts' property
Date: Wed, 20 May 2015 14:09:47 +0200 [thread overview]
Message-ID: <1432123792-4155-2-git-send-email-arend@broadcom.com> (raw)
In-Reply-To: <1432123792-4155-1-git-send-email-arend@broadcom.com>
As described in the device tree bindings for 'brcm,bcm4329-fmac'
nodes, the interrupts property is optional. So adding a check
for the presence of this property before attempting to parse
and map the interrupt. If not present or parsing fails return
and fallback to in-band sdio interrupt.
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
drivers/net/wireless/brcm80211/brcmfmac/of.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/of.c b/drivers/net/wireless/brcm80211/brcmfmac/of.c
index c824570..03f35e0 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/of.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/of.c
@@ -39,10 +39,16 @@ void brcmf_of_probe(struct brcmf_sdio_dev *sdiodev)
if (!sdiodev->pdata)
return;
+ if (of_property_read_u32(np, "brcm,drive-strength", &val) == 0)
+ sdiodev->pdata->drive_strength = val;
+
+ /* make sure there are interrupts defined in the node */
+ if (!of_find_property(np, "interrupts", NULL))
+ return;
+
irq = irq_of_parse_and_map(np, 0);
if (!irq) {
brcmf_err("interrupt could not be mapped\n");
- devm_kfree(dev, sdiodev->pdata);
return;
}
irqf = irqd_get_trigger_type(irq_get_irq_data(irq));
@@ -50,7 +56,4 @@ void brcmf_of_probe(struct brcmf_sdio_dev *sdiodev)
sdiodev->pdata->oob_irq_supported = true;
sdiodev->pdata->oob_irq_nr = irq;
sdiodev->pdata->oob_irq_flags = irqf;
-
- if (of_property_read_u32(np, "brcm,drive-strength", &val) == 0)
- sdiodev->pdata->drive_strength = val;
}
--
1.9.1
next prev parent reply other threads:[~2015-05-20 12:09 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-20 12:09 [PATCH 0/6] brcmfmac: PCIe changes and NVRAM support Arend van Spriel
2015-05-20 12:09 ` Arend van Spriel [this message]
2015-05-26 11:10 ` [1/6] brcmfmac: allow device tree node without 'interrupts' property Kalle Valo
2015-05-20 12:09 ` [PATCH 2/6] brcmfmac: Improve throughput by scheduling msbug flow worker Arend van Spriel
2015-05-20 12:09 ` [PATCH 3/6] brcmfmac: remove pci shared structure rev4 support Arend van Spriel
2015-05-20 12:09 ` [PATCH 4/6] brcmfmac: remove dummy cache flush/invalidate function Arend van Spriel
2015-05-20 12:09 ` [PATCH 5/6] brcmfmac: add support for dma indices feature Arend van Spriel
2015-05-20 12:09 ` [PATCH 6/6] brcmfmac: Add support for host platform NVRAM loading Arend van Spriel
2015-05-20 12:09 ` Arend van Spriel
2015-05-20 14:33 ` Rafał Miłecki
2015-05-21 8:28 ` Rafał Miłecki
2015-05-21 9:28 ` Arend van Spriel
2015-05-21 9:30 ` Arend van Spriel
2015-05-21 9:32 ` Rafał Miłecki
2015-05-21 10:16 ` Kalle Valo
2015-05-21 10:30 ` Arend van Spriel
2015-05-21 14:08 ` Kalle Valo
2015-05-20 15:02 ` Rafał Miłecki
2015-05-22 8:31 ` Arend van Spriel
2015-05-22 9:05 ` Rafał Miłecki
2015-05-22 9:20 ` Arend van Spriel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1432123792-4155-2-git-send-email-arend@broadcom.com \
--to=arend@broadcom.com \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.