From 7db3a1a5c9a9dcd2f085298fd0fb819ad082f74c Mon Sep 17 00:00:00 2001 From: Kiran Gunda Date: Wed, 24 Jun 2020 06:21:15 +0530 Subject: [PATCH] regulator: qpnp-lcdb: Disable step voltage ramp for PM8150L V3 The S/W work around to program the LCDB voltage in 500 mV steps is required only for PM8150L version < V3. So, ignore this W/A for the PM8150L V3 and above. Change-Id: Iaaf15062a19c5f6ae492f949d721a991e5b46669 Signed-off-by: Kiran Gunda --- drivers/regulator/qpnp-lcdb-regulator.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/qpnp-lcdb-regulator.c b/drivers/regulator/qpnp-lcdb-regulator.c index f32fbd9f4c2d..396ed5415eea 100644 --- a/drivers/regulator/qpnp-lcdb-regulator.c +++ b/drivers/regulator/qpnp-lcdb-regulator.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -2092,7 +2092,12 @@ static void qpnp_lcdb_pmic_config(struct qpnp_lcdb *lcdb) lcdb->wa_flags |= NCP_SCP_DISABLE_WA; break; case PMI632_SUBTYPE: - case PM6150L_SUBTYPE: + lcdb->wa_flags |= FORCE_PD_ENABLE_WA; + break; + case PM8150L_SUBTYPE: + if (lcdb->pmic_rev_id->rev4 >= PM8150L_V3P0_REV4) + lcdb->voltage_step_ramp = false; + lcdb->wa_flags |= FORCE_PD_ENABLE_WA; break; default: