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

Commit c132f17a authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: cpr-regulator: add debug message in cpr_scale"

parents 9d5413f2 ad93446b
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -548,6 +548,7 @@ static void cpr_scale(struct cpr_regulator *cpr_vreg,
{
	u32 reg_val, error_steps, reg_mask;
	int last_volt, new_volt, corner;
	u32 gcnt, quot;

	corner = cpr_vreg->corner;

@@ -559,6 +560,10 @@ static void cpr_scale(struct cpr_regulator *cpr_vreg,

	cpr_debug_irq("last_volt[corner:%d] = %d uV\n", corner, last_volt);

	gcnt = cpr_read(cpr_vreg, REG_RBCPR_GCNT_TARGET
			(cpr_vreg->cpr_fuse_ro_sel[corner]));
	quot = gcnt & ((1 << RBCPR_GCNT_TARGET_GCNT_SHIFT) - 1);

	if (dir == UP) {
		cpr_debug_irq("Up: cpr status = 0x%08x (error_steps=%d)\n",
			      reg_val, error_steps);
@@ -569,6 +574,9 @@ static void cpr_scale(struct cpr_regulator *cpr_vreg,
				      cpr_vreg->ceiling_volt[corner]);
			cpr_irq_clr_nack(cpr_vreg);

			cpr_debug_irq("gcnt = 0x%08x (quot = %d)\n", gcnt,
					quot);

			/* Maximize the UP threshold */
			reg_mask = RBCPR_CTL_UP_THRESHOLD_MASK <<
					RBCPR_CTL_UP_THRESHOLD_SHIFT;
@@ -623,6 +631,9 @@ static void cpr_scale(struct cpr_regulator *cpr_vreg,
				      cpr_vreg->floor_volt[corner]);
			cpr_irq_clr_nack(cpr_vreg);

			cpr_debug_irq("gcnt = 0x%08x (quot = %d)\n", gcnt,
					quot);

			/* Enable auto nack down */
			reg_mask = RBCPR_CTL_SW_AUTO_CONT_NACK_DN_EN;
			reg_val = RBCPR_CTL_SW_AUTO_CONT_NACK_DN_EN;