diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-06-02 22:18:47 +0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-08-01 01:28:19 +0400 |
commit | ca7a71824ac957b1b9d3322656c05aad38d7275c (patch) | |
tree | ff89c76b4cda114343c01f332aa28fb80095f3db /include/linux/mfd/wm831x | |
parent | 24c3047095fa3954f114bfff2e37b8fcbb216396 (diff) | |
download | linux-ca7a71824ac957b1b9d3322656c05aad38d7275c.tar.xz |
mfd: Fix bus lock interaction for WM831x IRQ set_type() operation
The WM831x IRQ set_type() operation is doing a direct register write when
called but since set_type() is called with the bus lock held this isn't
legal and could cause deadlocks in the IRQ core.
Fix this by posting the updates into an array and syncing in the
bus_sync_unlock() callback.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux/mfd/wm831x')
-rw-r--r-- | include/linux/mfd/wm831x/core.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/mfd/wm831x/core.h b/include/linux/mfd/wm831x/core.h index 0d515ee1c247..ebead1c401aa 100644 --- a/include/linux/mfd/wm831x/core.h +++ b/include/linux/mfd/wm831x/core.h @@ -237,6 +237,7 @@ struct regulator_dev; #define WM831X_NUM_IRQ_REGS 5 +#define WM831X_NUM_GPIO_REGS 16 enum wm831x_parent { WM8310 = 0x8310, @@ -272,6 +273,9 @@ struct wm831x { int num_gpio; + /* Used by the interrupt controller code to post writes */ + int gpio_update[WM831X_NUM_GPIO_REGS]; + struct mutex auxadc_lock; struct completion auxadc_done; |