lkml.org 
[lkml]   [2011]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mfd/stmpe: Add support for irq over gpio pin
On 11/7/2011 5:59 PM, Linus Walleij wrote:
> On Thu, Nov 3, 2011 at 10:26 AM, Viresh Kumar <viresh.kumar@st.com> wrote:

>> +free_gpio:
>> + gpio_free(pdata->irq_gpio);
>
> Will that work if you didn't request irq over GPIO?
>
> If you did not request GPIO and stmpe_chip_init()
> fails this will still be executed.
>
> Maybe:
>
> if (pdata->irq_over_gpio)
> gpio_free(pdata->irq_gpio);
>

:(
Silly mistake.

>> diff --git a/include/linux/mfd/stmpe.h b/include/linux/mfd/stmpe.h
>> index be1af7c..7901351 100644
>> --- a/include/linux/mfd/stmpe.h
>> +++ b/include/linux/mfd/stmpe.h
>> @@ -76,6 +76,7 @@ struct stmpe {
>> struct stmpe_variant_info *variant;
>> const u8 *regs;
>>
>> + int irq;
>> int irq_base;
>> int num_gpios;
>> u8 ier[2];
>> @@ -194,6 +195,8 @@ struct stmpe_platform_data {
>> unsigned int irq_trigger;
>> bool irq_invert_polarity;
>> bool autosleep;
>> + bool irq_over_gpio;
>> + int irq_gpio;
>> int autosleep_timeout;
>
> Please also update the kerneldoc for struct stmpe.

Sure.

--
viresh


\
 
 \ /
  Last update: 2011-11-08 04:51    [W:0.063 / U:1.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site