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

Commit a76bd782 authored by Sachin Bhayare's avatar Sachin Bhayare Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: Avoid disabling regulator again which is disabled



Multiple regulator disable call puts the regulator driver in bad state.
Added regulator status check before disable regulator to avoid multiple
regulator disable call.

Change-Id: I6b60384e16ca5d7bfa2a7cb04d1d1344573bf419
Signed-off-by: default avatarSachin Bhayare <sachin.bhayare@codeaurora.org>
parent bc387ed2
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -300,7 +300,10 @@ int msm_dss_enable_vreg(struct dss_vreg *in_vreg, int num_vreg, int enable)
					in_vreg[i].pre_off_sleep * 1000);
			regulator_set_optimum_mode(in_vreg[i].vreg,
				in_vreg[i].load[DSS_REG_MODE_DISABLE]);

			if (regulator_is_enabled(in_vreg[i].vreg))
				regulator_disable(in_vreg[i].vreg);

			if (in_vreg[i].post_off_sleep)
				usleep_range(in_vreg[i].post_off_sleep * 1000,
					in_vreg[i].post_off_sleep * 1000);