Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 83759a96 authored by Siddartha Mohanadoss's avatar Siddartha Mohanadoss
Browse files

hwmon: qpnp-adc-current: Fix potential race condition



There should be no synchronous Voltage and Current readings
initiated on IADC_USR when a single VADC_USR conversion is
in progress. If a synchronous Voltage and Current read
occures while a VADC_USR is in progress it results in an
invalid state for that single conversion on the VADC_USR.
There is a potential race condition where the above scenario
can occur that is due to an IADC conversion occuring before
the VADC_IADC USR sync conversion is complete and ends up
using the mode select as a VADC_IADC sync request.
Therefore use a single lock for both IADC and
synchronous VADC_IADC request.

Change-Id: Idb451b813bc5f08b7239d371fc0f8fa5e17429b1
Signed-off-by: default avatarSiddartha Mohanadoss <smohanad@codeaurora.org>
parent b8a2a10e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment