Messages in this thread | | | Date | Tue, 8 Nov 2011 09:18:28 +0530 | From | Viresh Kumar <> | Subject | Re: [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
| |