From c413bcb70acf3c6ae11924d286c99c078d905c82 Mon Sep 17 00:00:00 2001 From: Osvaldo Banuelos Date: Thu, 7 Apr 2016 16:21:13 -0700 Subject: [PATCH] regulator: cprh-kbss-regulator: fix interpolation for highest fuse corner Currently, open-loop voltage interpolation is skipped for corners mapping to the highest fused corner thus resulting in incorrect open-loop voltages when open-loop interpolation is enabled. Fix this. Change-Id: Iab5a2dadfec45efb08b9c45f956e9f102d2d2c55 CRs-Fixed: 1001350 Signed-off-by: Osvaldo Banuelos --- drivers/regulator/cprh-kbss-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/cprh-kbss-regulator.c b/drivers/regulator/cprh-kbss-regulator.c index 1e516fe9865e..01a385cbc5d0 100644 --- a/drivers/regulator/cprh-kbss-regulator.c +++ b/drivers/regulator/cprh-kbss-regulator.c @@ -433,7 +433,7 @@ static int cprh_msmcobalt_kbss_calculate_open_loop_voltages( vreg->corner[i].open_loop_volt = fuse_volt[0]; /* Interpolate voltages for the higher fuse corners. */ - for (i = 1; i < vreg->fuse_corner_count - 1; i++) { + for (i = 1; i < vreg->fuse_corner_count; i++) { freq_low = vreg->corner[fmax_corner[i - 1]].proc_freq; volt_low = fuse_volt[i - 1]; freq_high = vreg->corner[fmax_corner[i]].proc_freq;