summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOsvaldo Banuelos <osvaldob@codeaurora.org>2016-05-19 10:47:48 -0700
committerKyle Yan <kyan@codeaurora.org>2016-05-25 14:21:21 -0700
commit75eedba41c70333d7179a7010c5f15e537c1de0f (patch)
tree41c60b27f0a5f26789797f4c6f945b472d1687ba
parent2c0842299dd293b2accf1d5f419f21ed712c3953 (diff)
regulator: cpr3-regulator: support corner bands with no adjustments
Corner bands used on CPRh controllers may not necessarily define per-online-core or per-temperature adjustments. Do not attempt to program adjustments on corner bands whose sdelta tables do not have either core-count or temperature based adjustments defined. Change-Id: I87d18778fef81671c5e7cc261cc70ce07c662933 CRs-Fixed: 1020505 Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
-rw-r--r--drivers/regulator/cpr3-regulator.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/regulator/cpr3-regulator.c b/drivers/regulator/cpr3-regulator.c
index 9a5f33e3e9d8..9f5c67bc2d6f 100644
--- a/drivers/regulator/cpr3-regulator.c
+++ b/drivers/regulator/cpr3-regulator.c
@@ -1204,6 +1204,14 @@ static void cprh_controller_program_sdelta(
corner_band = &vreg->corner_band[i];
sdelta = corner_band->sdelta;
+ if (!sdelta->allow_core_count_adj && !sdelta->allow_temp_adj) {
+ /*
+ * Per-online-core and per-temperature margin
+ * adjustments are disabled for this corner band.
+ */
+ continue;
+ }
+
if (vreg->allow_core_count_adj)
cpr3_write_temp_core_margin(ctrl,
CPRH_MARGIN_TEMP_CORE_VBAND(0, i),