regulator: cpr3: Use default step_quot during corner switch

Configure CPR4/h controllers to reset to default step_quot on each
loop_en = 0 transition. This enables the CPR controller to use the
default step_quot during a corner switch and then later switch to
the run-time calibrated step_quot. Without this feature enabled,
there is a chance for the CPR controller to use the run-time
calibrated step_quot of lower modes for higher modes that sometimes
can lead to closed-loop voltage getting stuck at open-loop voltage.

CRs-Fixed: 2003482
Change-Id: Ic738f6205a2e2030202abd811e94bd47240bad43
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
diff --git a/drivers/regulator/cpr3-regulator.h b/drivers/regulator/cpr3-regulator.h
index 570ddfc..8535020 100644
--- a/drivers/regulator/cpr3-regulator.h
+++ b/drivers/regulator/cpr3-regulator.h
@@ -756,6 +756,12 @@
  * @panic_notifier:	Notifier block registered to global panic notifier list.
  * @support_ldo300_vreg: Boolean value which indicates that this CPR controller
  *			manages an underlying LDO regulator of type LDO300.
+ * @reset_step_quot_loop_en: Boolean value which indicates that this CPR
+ *			controller should be configured to reset step_quot on
+ *			each loop_en = 0 transition. This configuration allows
+ *			the CPR controller to first use the default step_quot
+ *			and then later switch to the run-time calibrated
+ *			step_quot.
  *
  * This structure contains both configuration and runtime state data.  The
  * elements cpr_allowed_sw, use_hw_closed_loop, aggr_corner, cpr_enabled,
@@ -866,6 +872,7 @@
 	struct cpr3_panic_regs_info *panic_regs_info;
 	struct notifier_block	panic_notifier;
 	bool			support_ldo300_vreg;
+	bool			reset_step_quot_loop_en;
 };
 
 /* Used for rounding voltages to the closest physically available set point. */