diff options
author | Sebastian Reichel <sebastian.reichel@collabora.co.uk> | 2017-06-30 16:35:03 +0200 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2017-09-05 08:46:00 +0100 |
commit | 45f80a9f78f1bcf87c09ae120a68011efe35128a (patch) | |
tree | 06618ac8184f9bf79dfa9abfea6999396ee837a1 /drivers/mfd | |
parent | e26ae3660b9ca2d180131670ae5388580dcf19b3 (diff) | |
download | talos-obmc-linux-45f80a9f78f1bcf87c09ae120a68011efe35128a.tar.gz talos-obmc-linux-45f80a9f78f1bcf87c09ae120a68011efe35128a.zip |
mfd: da9052: Fix manual ADC read after timed out read
It is possible that under heavy system load, the counter in the completion
struct, used for waiting for end of AD conversion, gets incremented twice.
To make sure the driver recovers from this situation, the completion struct
should be reinitialized.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/da9052-core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mfd/da9052-core.c b/drivers/mfd/da9052-core.c index a23a3a1c7061..433add43a0a9 100644 --- a/drivers/mfd/da9052-core.c +++ b/drivers/mfd/da9052-core.c @@ -387,6 +387,8 @@ int da9052_adc_manual_read(struct da9052 *da9052, unsigned char channel) mutex_lock(&da9052->auxadc_lock); + reinit_completion(&da9052->done); + /* Channel gets activated on enabling the Conversion bit */ mux_sel = chan_mux[channel] | DA9052_ADC_MAN_MAN_CONV; |