[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6ed0b2680911270747k4bd5610eg1e0ef83c41622bba@mail.gmail.com>
Date: Fri, 27 Nov 2009 17:47:40 +0200
From: Grazvydas Ignotas <notasas@...il.com>
To: avorontsov@...mvista.com
Cc: linux-kernel@...r.kernel.org,
Madhusudhan Chikkature <madhu.cr@...com>,
linux-omap@...r.kernel.org
Subject: Re: [PATCH] power_supply: Add driver for TWL4030/TPS65950 BCI charger
On Fri, Nov 27, 2009 at 4:54 PM, Anton Vorontsov
<avorontsov@...mvista.com> wrote:
> On Fri, Nov 27, 2009 at 04:44:20PM +0200, Grazvydas Ignotas wrote:
>> TWL4030/TPS65950 is a multi-function device with integrated charger,
>> which allows charging from AC or USB. This driver enables the
>> charger and provides several monitoring functions.
>>
>> Signed-off-by: Grazvydas Ignotas <notasas@...il.com>
>> ---
>
> Thanks for the patch.
>
> [...]
>> +/*
>> + * Attend to TWL4030 CHG_PRES (AC charger presence) events
>> + */
>> +static irqreturn_t twl4030_charger_interrupt(int irq, void *_di)
>> +{
>> + struct twl4030_bci_device_info *di = _di;
>> +
>> +#ifdef CONFIG_LOCKDEP
>> + /* WORKAROUND for lockdep forcing IRQF_DISABLED on us, which
>> + * we don't want and can't tolerate. Although it might be
>> + * friendlier not to borrow this thread context...
>> + */
>> + local_irq_enable();
>> +#endif
>
> Can you explain why the driver can't tolerate disabled irqs?
> Calling schedule_delayed_work() from an irq context should be OK.
Ah, this is leftover from TI code this driver is based on, which used
to do more things directly in interrupt handler. So I guess it can be
removed, updated patch attached.
>
>> + schedule_delayed_work(&di->bat_work, msecs_to_jiffies(BCI_DELAY));
>> +
>> + return IRQ_HANDLED;
>> +}
>
> --
> Anton Vorontsov
> email: cbouatmailru@...il.com
> irc://irc.freenode.net/bd2
>
View attachment "0001-power_supply-Add-driver-for-TWL4030-TPS65950-BCI-cha.patch" of type "text/x-diff" (13403 bytes)
Powered by blists - more mailing lists