Re: [PATCH v2] POWER: Add gpio charger driver

From: Lars-Peter Clausen
Date: Thu Oct 21 2010 - 12:17:01 EST


Mark Brown wrote:
> On Thu, Oct 21, 2010 at 05:55:01PM +0200, Lars-Peter Clausen wrote:
>
>> + irq = gpio_to_irq(pdata->gpio);
>> + if (irq > 0) {
>> + ret = request_irq(irq, gpio_charger_irq,
>> + IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
>> + dev_name(&pdev->dev), charger);
>> + if (ret)
>> + dev_warn(&pdev->dev, "Failed to request irq: %d\n", ret);
>
> It would be good to handle IRQs that can sleep (like those on I2C GPIO
> expanders) here - either always use a threaded IRQ handler (probably
> won't hurt here) or use one if the IRQ can sleep.

I guess the best would be to use `request_any_context_irq`, right?

- Lars
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/