Re: [PATCH V2 3/3] mfd: palmas: Add support for optional wakeup
From: Nishanth Menon
Date: Mon Sep 08 2014 - 11:41:51 EST
On 23:13-20140905, Thomas Gleixner wrote:
> On Fri, 5 Sep 2014, Nishanth Menon wrote:
> > + if (!palmas->wakeirq)
> > + goto no_wake_irq;
> > +
> > + ret = devm_request_irq(palmas->dev, palmas->wakeirq,
> > + palmas_wake_irq,
> > + IRQF_ONESHOT | pdata->irq_flags,
>
> Why is this marked IRQF_ONESHOT?
Uggh.. should have dropped it. my bad.. removed in the revision below.
Thanks for catching it.
>
> > + dev_name(palmas->dev),
> > + &palmas);
> > + if (ret < 0)
> > + goto err_i2c;
>
> Why err and not doing the obvious clearing of palmas->wakeirq and
> keep at least the i2c functional?
Hmmm.. true.. we can stay alive even though without wakeup capability if
someone messes up configuration..
Fixed version below. Let me know if you are ok with the following.
----8<----