[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <53845347.5020205@linux.intel.com>
Date: Tue, 27 May 2014 16:56:39 +0800
From: "Zhu, Lejun" <lejun.zhu@...ux.intel.com>
To: Grygorii Strashko <grygorii.strashko@...com>,
Mika Westerberg <mika.westerberg@...ux.intel.com>
CC: Alexandre Courbot <gnurou@...il.com>,
Linus Walleij <linus.walleij@...aro.org>,
Mathias Nyman <mathias.nyman@...ux.intel.com>,
"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
jacob.jun.pan@...ux.intel.com, bin.yang@...el.com
Subject: Re: [PATCH v4] gpio: Add support for Intel SoC PMIC (Crystal Cove)
On 5/27/2014 5:24 PM, Grygorii Strashko wrote:
> Hi Lejun,
>
> On 05/27/2014 08:38 AM, Alexandre Courbot wrote:
>> On Fri, May 23, 2014 at 11:00 AM, Zhu, Lejun <lejun.zhu@...ux.intel.com> wrote:
>>> +static int crystalcove_gpio_probe(struct platform_device *pdev)
>>> +{
>>> + int irq = platform_get_irq(pdev, 0);
>
> Pls note, that platform_get_irq() may return error code.
Thank you. I'll fix it.
>
> devm_gpiochip_add? ;)
>
Huh? Can't find the API...
>>> +
>>> + if (retval) {
>>> + dev_warn(&pdev->dev, "request irq failed: %d\n", retval);
>>> + goto out;
>>> + }
>>> +
>>> + retval = gpiochip_add(&cg->chip);
>>> + if (retval) {
>>> + dev_warn(&pdev->dev, "add gpio chip error: %d\n", retval);
>>> + goto out_free_irq;
>>> + }
>
> As to my mind, It'll be better to setup IRQ as last probing step and
> free it as the first step of driver removing.
Mika suggested this order. Please see his mail for the reason. Is there
anything bad might happen if I setup IRQ first then do gpiochip_add?
Best Regards
Lejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists