From: Felipe Balbi <balbi@ti.com>
To: Luciano Coelho <coelho@ti.com>
Cc: <balbi@ti.com>, <linux-wireless@vger.kernel.org>,
<tony@atomide.com>, <nsekhar@ti.com>, <mturquette@linaro.org>,
<mark.rutland@arm.com>, <grant.likely@linaro.org>,
<rob.herring@calxeda.com>, <devicetree-discuss@lists.ozlabs.org>,
<linux-doc@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-omap@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>, <nm@ti.com>
Subject: Re: [PATCH v3 2/8] wlcore: set irq_flags in the board files instead of hiding behind a quirk
Date: Wed, 3 Jul 2013 17:23:11 +0300 [thread overview]
Message-ID: <20130703142310.GT15056@arwen.pp.htv.fi> (raw)
In-Reply-To: <1372861094.21065.118.camel@cumari.coelho.fi>
[-- Attachment #1: Type: text/plain, Size: 1939 bytes --]
On Wed, Jul 03, 2013 at 05:18:14PM +0300, Luciano Coelho wrote:
> On Wed, 2013-07-03 at 17:13 +0300, Felipe Balbi wrote:
> > Hi,
> >
> > On Wed, Jul 03, 2013 at 05:03:23PM +0300, Luciano Coelho wrote:
> > > diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
> > > index 56a9a4f..953f620 100644
> > > --- a/arch/arm/mach-omap2/board-4430sdp.c
> > > +++ b/arch/arm/mach-omap2/board-4430sdp.c
> > > @@ -703,12 +703,30 @@ static void __init omap4_sdp4430_wifi_init(void)
> > >
> > > omap4_sdp4430_wifi_mux_init();
> > > omap4_sdp4430_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
> > > +
> > > + ret = gpio_request_one(GPIO_WIFI_IRQ, GPIOF_IN, "GPIO_WIFI_IRQ");
> > > + if (ret) {
> > > + pr_err("error requesting wl12xx gpio: %d\n", ret);
> > > + goto out;
> > > + }
> > > +
> > > + ret = irq_set_irq_type(gpio_to_irq(GPIO_WIFI_IRQ), IRQ_TYPE_LEVEL_HIGH);
> > > + if (ret) {
> > > + pr_err("error setting wl12xx irq type: %d\n", ret);
> > > + goto free;
> > > + }
> > > +
> > > ret = wl12xx_set_platform_data(&omap4_sdp4430_wlan_data);
> > > if (ret)
> > > pr_err("Error setting wl12xx data: %d\n", ret);
> > > +
> > > ret = platform_device_register(&omap_vwlan_device);
> > > if (ret)
> > > pr_err("Error registering wl12xx device: %d\n", ret);
> > > +out:
> > > + return;
> > > +free:
> > > + gpio_free(GPIO_WIFI_IRQ);
> >
> > actually, you should leave this GPIO requested in order to use it as
> > IRQ.
> >
> > ditto for all others
>
> Actually, I don't need to use the GPIO if something goes wrong (ie.
> setting the IRQ type or setting the platform data). Notice that in the
> normal cases (ie. without errors), I return before the gpio_free() is
> called.
hah, missed the 'return' call, my bad :-p
Reviewed-by: Felipe Balbi <balbi@ti.com>
Corrected-my-broken-eye-sight-by: Luciano Coelho <coelho@ti.com>
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-07-03 14:24 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-03 14:03 [PATCH v3 0/8] wilink: add device tree support Luciano Coelho
2013-07-03 14:03 ` [PATCH v3 1/8] wl1251: split wl251 platform data to a separate structure Luciano Coelho
2013-07-03 14:11 ` Felipe Balbi
2013-07-03 14:03 ` [PATCH v3 2/8] wlcore: set irq_flags in the board files instead of hiding behind a quirk Luciano Coelho
2013-07-03 14:13 ` Felipe Balbi
2013-07-03 14:18 ` Luciano Coelho
2013-07-03 14:23 ` Felipe Balbi [this message]
2013-07-03 14:15 ` Luciano Coelho
2013-07-03 15:12 ` Javier Martinez Canillas
2013-07-04 14:21 ` Luciano Coelho
2013-07-04 4:46 ` Sekhar Nori
2013-07-03 14:03 ` [PATCH v3 3/8] wlcore: remove pwr_in_suspend from platform data Luciano Coelho
2013-07-03 14:14 ` Felipe Balbi
2013-07-03 14:03 ` [PATCH v3 4/8] wl12xx: use frequency instead of enumerations for pdata clocks Luciano Coelho
2013-07-03 14:16 ` Felipe Balbi
2013-07-03 14:03 ` [PATCH v3 5/8] wlcore: add initial device tree support to the sdio module Luciano Coelho
2013-07-03 14:18 ` Felipe Balbi
2013-07-03 14:03 ` [PATCH v3 6/8] wlcore: sdio: add wilink clock providers Luciano Coelho
2013-07-03 14:03 ` [PATCH v3 7/8] wlcore: sdio: get clocks from device tree Luciano Coelho
2013-07-03 14:03 ` [PATCH v3 8/8] wlcore/wl12xx: check if we got correct clock data from DT Luciano Coelho
2013-07-03 14:19 ` Felipe Balbi
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=20130703142310.GT15056@arwen.pp.htv.fi \
--to=balbi@ti.com \
--cc=coelho@ti.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mturquette@linaro.org \
--cc=nm@ti.com \
--cc=nsekhar@ti.com \
--cc=rob.herring@calxeda.com \
--cc=tony@atomide.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
all inboxes | Powered by JetHome®