From c0c624e319e557090f8d7121fbe1f2f04cd9d92c Mon Sep 17 00:00:00 2001 From: Subbaraman Narayanamurthy Date: Wed, 24 Jan 2018 17:38:51 -0800 Subject: [PATCH] regulator: qpnp-labibb: Don't handle LAB_VREG_OK in TTW mode for pmi8998 Currently for pmi8998, LAB_VREG_OK interrupt is handled to switch from PWM to PFM mode after a certain delay to improve efficiency. Also, PFM mode is kept disabled once the regulator is disabled. As per the hardware recommendation, keeping LAB in PWM mode is sufficient in particular when TTW mode is enabled. Hence do not register for LAB_VREG_OK interrupt in TTW mode so that this PWM <-> PFM mode transition will not be done. CRs-Fixed: 2179209 Change-Id: I499740d014a45e02b802d350248f8044a5b6596b Signed-off-by: Subbaraman Narayanamurthy --- drivers/regulator/qpnp-labibb-regulator.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/qpnp-labibb-regulator.c b/drivers/regulator/qpnp-labibb-regulator.c index 9f89843a6d20..bc667973f3cb 100644 --- a/drivers/regulator/qpnp-labibb-regulator.c +++ b/drivers/regulator/qpnp-labibb-regulator.c @@ -2849,8 +2849,11 @@ static bool is_lab_vreg_ok_irq_available(struct qpnp_labibb *labibb) return true; if (labibb->pmic_rev_id->pmic_subtype == PMI8998_SUBTYPE && - labibb->mode == QPNP_LABIBB_LCD_MODE) + labibb->mode == QPNP_LABIBB_LCD_MODE) { + if (labibb->ttw_en) + return false; return true; + } return false; }