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

Commit 866c5caa authored by Subbaraman Narayanamurthy's avatar Subbaraman Narayanamurthy
Browse files

regulator: qpnp-amoled: Fix IBB load current threshold



commit 0a1de26d ("regulator: qpnp-amoled: Add set_load()
callback for IBB regulator") added set_load() in IBB regulator to
configure phase control. However, load current threshold is set
to 30 A instead of 30 mA. Fix it. Also, when load current is set
to 0, switch to auto dual phase as per hardware recommendation.

While at it, fix the indentation for related macro definitions.

Change-Id: I513b2436874b47f0856423eac8a6786651d1f8ba
Signed-off-by: default avatarSubbaraman Narayanamurthy <subbaram@codeaurora.org>
parent 9cbbef04
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -290,7 +290,7 @@ static unsigned int qpnp_ab_ibb_regulator_get_mode(struct regulator_dev *rdev)
	return chip->ibb.vreg.mode;
}

#define SINGLE_PHASE_LIMIT_UA	30000000
#define SINGLE_PHASE_ILIMIT_UA	30000

static int qpnp_ibb_regulator_set_load(struct regulator_dev *rdev,
				int load_uA)
@@ -303,8 +303,8 @@ static int qpnp_ibb_regulator_set_load(struct regulator_dev *rdev,

	if (load_uA < 0)
		return -EINVAL;
	else if (load_uA <= SINGLE_PHASE_LIMIT_UA)
		ibb_phase = FORCE_SINGLE_PHASE_BIT;
	else if (load_uA <= SINGLE_PHASE_ILIMIT_UA)
		ibb_phase = AUTO_DUAL_PHASE_BIT;
	else
		ibb_phase = FORCE_DUAL_PHASE_BIT;