summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTirupathi Reddy <tirupath@codeaurora.org>2016-07-04 09:53:14 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2017-04-04 23:29:01 -0700
commit77f543a0c54227c64831af59d3a7ddfcae267417 (patch)
treea9afd54c3650775daa58ddd03b277eed07e946e3
parent62413888f1b970b82e50a784904818754e11a400 (diff)
regulator: cpr3: Update temp based adjustments config
Temp_adj_en instantaneously reduces the voltage and quotient when temperature enters into corresponding band which may cause an aggressive reduction in voltage. Avoid this by not configuring temp_adj_en bit, this only reduces the quotient and allows CPR to react to the reduced quotient. Use temp_adj_en bit only when both temperature based and core count based adjustments are desired. CRs-Fixed: 1051076 Change-Id: Ia42dbdd095e51bf9b9b7e865c104dcbe8f4219da Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
-rw-r--r--drivers/regulator/cpr3-regulator.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/regulator/cpr3-regulator.c b/drivers/regulator/cpr3-regulator.c
index 8884c6033af9..d131a8ea4144 100644
--- a/drivers/regulator/cpr3-regulator.c
+++ b/drivers/regulator/cpr3-regulator.c
@@ -1017,7 +1017,8 @@ static int cpr3_controller_program_sdelta(struct cpr3_controller *ctrl)
max_core_count << CPR4_MARGIN_ADJ_CTL_MAX_NUM_CORES_SHIFT
| ((sdelta->allow_core_count_adj || sdelta->allow_boost)
? CPR4_MARGIN_ADJ_CTL_CORE_ADJ_EN : 0)
- | ((sdelta->allow_temp_adj && ctrl->supports_hw_closed_loop)
+ | ((sdelta->allow_temp_adj && ctrl->supports_hw_closed_loop
+ && sdelta->allow_core_count_adj)
? CPR4_MARGIN_ADJ_CTL_TEMP_ADJ_EN : 0)
| (((ctrl->use_hw_closed_loop && !sdelta->allow_boost)
|| !ctrl->supports_hw_closed_loop)