spmi: pmic-arb: fix missing interrupts
authorAbhijeet Dharmapurikar <adharmap@codeaurora.org>
Wed, 10 May 2017 14:25:36 +0000 (19:55 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Jun 2017 10:05:47 +0000 (19:05 +0900)
commitf6dda8e2e8479f3a71c88d6a21fe98d0fa7e0e31
treef2293bc34ae341feaeedbde780380a4bd3c56075
parent6bc546e71e50b8dd49130033f066676504c29b0c
spmi: pmic-arb: fix missing interrupts

irq_enable is called when the device resumes. Note that the
irq_enable is called regardless of whether the interrupt was
marked enabled/disabled in the descriptor or whether it was
masked/unmasked at the controller while resuming.

The current driver unconditionally clears the interrupt in its
irq_enable callback. This is dangerous as any interrupts that
happen right before the resume could be missed.
Remove the irq_enable callback and use mask/unmask instead.

Also remove struct pmic_arb_irq_spec as it serves no real purpose.
It is used only in the translate function and the code is much
cleaner without it.

Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spmi/spmi-pmic-arb.c