mfd: Read wm831x AUXADC conversion results before acknowledging interrupt

Ensure that there's no possibility of loosing an AUXADC interrupt by reading
the conversion result in the IRQ handler when using interrupts. Otherwise
it's possible that under very heavy load a new conversion could be initiated
before the acknowledgement for a previous interrupt has happened.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Mark Brown
2011-06-02 19:18:52 +01:00
committed by Samuel Ortiz
parent 5c05a8d1f0
commit c1a82780b4
2 changed files with 32 additions and 16 deletions

View File

@@ -278,6 +278,7 @@ struct wm831x {
struct mutex auxadc_lock;
struct completion auxadc_done;
u16 auxadc_data;
/* The WM831x has a security key blocking access to certain
* registers. The mutex is taken by the accessors for locking