mfd: arizona: Use suspend_noirq inplace of suspend_late
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Tue, 30 Aug 2016 09:33:10 +0000 (10:33 +0100)
committerLee Jones <lee.jones@linaro.org>
Mon, 12 Sep 2016 08:56:17 +0000 (09:56 +0100)
commit1aed74c0e06a3def3c9b646e0063e40dc47829b2
treea34c3f39c9c5f9cfb76a09eae2aaf5a5a05a2698
parentd636055ae489bf9a777b052d14790ba8c8981498
mfd: arizona: Use suspend_noirq inplace of suspend_late

As runtime PM doesn't function whilst processing system suspend/resume
operations and the Arizona IRQ handlers need runtime PM to function
we must disable IRQs during these operations. Whilst this is
already done in the driver we are using suspend/suspend_late and
resume/resume_noirq to do so which has two problems. Firstly, as
suspend_late is before suspend_noirq that means we still have a
small window where an IRQ can cause issues.  Secondly, if another
suspend_late handler fails after ours has run then (as resume_noirq
will not run) we will make unbalanced calls to enable_irq.

This is all simply fixed by using the suspend_noirq callback rather
than suspend_late. Whilst we are doing this tidy the code up a little,
and use the appropriate helper macros.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/arizona-core.c
This page took 0.02674 seconds and 5 git commands to generate.