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

Commit b2fa356b authored by Manaf Meethalavalappu Pallikunhi's avatar Manaf Meethalavalappu Pallikunhi
Browse files

msm: thermal: Request INT_MAX as max for regulator set voltage API



During Vdd restriction trigger/clear request, KTM request it's vote
to regulator via regulator_set_voltage() API. KTM is interested only
in min value for this feature, always request INT_MAX as max value
instead of supported MAX corner of that regulator. It makes sure
that there is no impact if MAX corner for that regulator is changed
at any time.

Change-Id: Iebcb0383ea7b44d8584adb610ca7b56f0db2e755
Signed-off-by: default avatarManaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
parent dc9078ea
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1806,14 +1806,14 @@ static int vdd_restriction_apply_voltage(struct rail *r, int level)
	/* level = -1: disable, level = 0,1,2..n: enable */
	if (level == -1) {
		ret = regulator_set_voltage(r->reg, r->min_level,
			r->levels[r->num_levels - 1]);
			INT_MAX);
		if (!ret)
			r->curr_level = -1;
		pr_debug("Requested min level for %s. curr level: %d\n",
				r->name, r->curr_level);
	} else if (level >= 0 && level < (r->num_levels)) {
		ret = regulator_set_voltage(r->reg, r->levels[level],
			r->levels[r->num_levels - 1]);
			INT_MAX);
		if (!ret)
			r->curr_level = level;
		pr_debug("Requesting level %d for %s. curr level: %d\n",