[PATCH v4 07/14] mfd: Add driver for Maxim 77802 Power Management IC

Doug Anderson dianders at chromium.org
Thu Jun 26 09:12:58 PDT 2014


Javier,

On Thu, Jun 26, 2014 at 4:13 AM, Javier Martinez Canillas
<javier.martinez at collabora.co.uk> wrote:
>>> +
>>> +#ifdef CONFIG_PM_SLEEP
>>> +static int max77802_suspend(struct device *dev)
>>> +{
>>> +    struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
>>> +    struct max77802_dev *max77802 = i2c_get_clientdata(i2c);
>>> +
>>> +    if (device_may_wakeup(dev))
>>> +            enable_irq_wake(max77802->irq);
>>> +
>>> +    disable_irq(max77802->irq);
>>
>> Can you add short comment why this is needed? I know why but just for
>> future generations which will wonder: "why do we need to disable the IRQ
>> while suspending?" :). Especially that this is rather a workaround for
>> issue in other driver (I2C bus).
>>
>
> Good idea, I'll add a comment here on next version so code archaeologists can
> figure out what what's going on here.

Is the disable_irq() needed if you have
<https://patchwork.kernel.org/patch/4421891/>?



More information about the linux-arm-kernel mailing list