From: Arnd Bergmann <arnd@arndb.de>
To: Eliad Peller <eliad@wizery.com>
Cc: linux-wireless@vger.kernel.org, devicetree@vger.kernel.org,
Mark Rutland <mark.rutland@arm.com>
Subject: Re: [PATCH v3 2/2] wl18xx: add basic device-tree support
Date: Fri, 27 Feb 2015 09:26:13 +0100 [thread overview]
Message-ID: <2194797.iarD5YIxEd@wuerfel> (raw)
In-Reply-To: <1424362401-8228-2-git-send-email-eliad@wizery.com>
On Thursday 19 February 2015 18:13:21 Eliad Peller wrote:
> +
> +static struct wl12xx_platform_data *wlcore_probe_of(struct device *dev)
> +{
> + struct device_node *np = dev->of_node;
> + struct wl12xx_platform_data *pdata;
> +
> + if (!np || !of_match_node(wlcore_sdio_of_match_table, np)) {
> + dev_err(dev, "No platform data set\n");
> + return NULL;
> + }
> +
> + pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
> + if (!pdata)
> + return NULL;
> +
> + pdata->irq = irq_of_parse_and_map(np, 0);
> + if (!pdata->irq) {
> + dev_err(dev, "No irq in platform data\n");
> + kfree(pdata);
> + return NULL;
> + }
> +
> + return pdata;
> +}
> +#else
> +static struct wl12xx_platform_data *wlcore_probe_of(struct device *dev)
> +{
> + return NULL;
> +}
> +#endif
> +
> +static struct wl12xx_platform_data *
> +wlcore_get_platform_data(struct device *dev)
> +{
> + struct wl12xx_platform_data *pdata;
> +
> + pdata = wl12xx_get_platform_data();
> + if (!IS_ERR(pdata))
> + return kmemdup(pdata, sizeof(*pdata), GFP_KERNEL);
> +
> + return wlcore_probe_of(dev);
> +}
I think the probe_of needs to come first here, otherwise you cannot
override the pdata quirk with actual DT data.
I've looked up the what boards actually use this data and found that
all of them already support booting from DT: some omap2 boards using
arch/arm/mach-omap2/pdata-quirks.c to provide the data, and the
davinci 850evm. Can you make sure you add the correct data to all
of these dts files as part of your series and remove the
wl12xx_platform_data references?
Arnd
next prev parent reply other threads:[~2015-02-27 8:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-19 16:13 [PATCH v3 1/2] dt: bindings: add wl18xx wireless device Eliad Peller
2015-02-19 16:13 ` [PATCH v3 2/2] wl18xx: add basic device-tree support Eliad Peller
2015-02-27 8:26 ` Arnd Bergmann [this message]
2015-03-08 11:13 ` Eliad Peller
2015-03-08 21:53 ` Arnd Bergmann
2015-03-09 7:18 ` Eliad Peller
2015-03-09 8:50 ` Arnd Bergmann
2015-03-09 15:13 ` Eliad Peller
2015-02-27 7:35 ` [PATCH v3 1/2] dt: bindings: add wl18xx wireless device Luca Coelho
2015-02-27 8:14 ` Arnd Bergmann
2015-03-08 11:06 ` Eliad Peller
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=2194797.iarD5YIxEd@wuerfel \
--to=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=eliad@wizery.com \
--cc=linux-wireless@vger.kernel.org \
--cc=mark.rutland@arm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).