summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/arizona-core.c
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>2016-11-14 17:15:56 +0000
committerLee Jones <lee.jones@linaro.org>2016-11-29 08:21:37 +0000
commitfb36f77efec7c4371a8be0c73424fa2bf841e3b2 (patch)
tree451d070f552cda60d83b32c77e2fbee0d7c0658e /drivers/mfd/arizona-core.c
parent953f432b3d0a171276455e40fdeac7225d36d678 (diff)
downloadtalos-obmc-linux-fb36f77efec7c4371a8be0c73424fa2bf841e3b2.tar.gz
talos-obmc-linux-fb36f77efec7c4371a8be0c73424fa2bf841e3b2.zip
mfd: arizona: Disable IRQs during driver remove
As DCVDD will often be supplied by a child node of the MFD, we can't call mfd_remove_devices as the first step in arizona_dev_exit as might be expected (tidy up the children before we tidy up the MFD). We need to disable and put the DCVDD regulator before we call mfd_remove_devices, to prevent PM runtime from turning this back on we also need to disable the PM runtime before we do this. Finally we can not clean up the IRQs until all the MFD children have been removed, as they may have registered IRQs themselves. This creates a window of time where the interrupts are enabled but the PM runtime, on which the IRQ handler depends, is not available, any interrupts in this window will go unhandled and fill the log with failed to resume device messages. To avoid this we simply disable the main IRQ at the start of arizona_dev_exit, we don't need to actually handle any IRQs in this window as we are removing the driver. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/arizona-core.c')
-rw-r--r--drivers/mfd/arizona-core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
index 41767f7239bb..b6d4bc63c426 100644
--- a/drivers/mfd/arizona-core.c
+++ b/drivers/mfd/arizona-core.c
@@ -1553,6 +1553,7 @@ EXPORT_SYMBOL_GPL(arizona_dev_init);
int arizona_dev_exit(struct arizona *arizona)
{
+ disable_irq(arizona->irq);
pm_runtime_disable(arizona->dev);
regulator_disable(arizona->dcvdd);
OpenPOWER on IntegriCloud