regulator: cpr-regulator: do not enable CPR if vreg_enable is false
Modify the cpr-regulator driver so that CPR is not enabled (i.e.
LOOP_EN set to 1) in the case that vreg_enable is false. At the
same time, move vreg_enable setting statements inside of mutex
protected blocks in order to avoid race conditions between the
debugfs, regulator, and suspend/resume call paths.
If CPR is enabled while vreg_enable is false, then unexpected CPR
interrupts will likely fire due to the physical APC voltage not
matching the logical value. The physical APC voltage is only
guaranteed to change after the enable callback is called at which
point vreg_enable is set to true.
Change-Id: I1cff2db1d0527f6675d7592a64ed6303da6dcacf
Signed-off-by:
David Collins <collinsd@codeaurora.org>
Loading
Please register or sign in to comment