From c90bbfc477f92ea9df2925fbef6f3f47bc71b554 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Tue, 29 Mar 2016 16:33:42 -0700 Subject: [PATCH] UPSTREAM: regulator: core: Log when we bring constraints into range This aids in debugging problems triggered by the regulator core applying its constraints, we could potentially crash immediately after updating the voltage if the constraints are buggy. Signed-off-by: Mark Brown (cherry picked from commit 45a91e8f767afbbffff46bf7251f81d15d121136) Change-Id: I8c3e4a856f05c13e6ce3db8a6d46686557109962 Signed-off-by: David Wu --- drivers/regulator/core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 59778a4801c0..0d57cd6c3f24 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -933,6 +933,8 @@ static int machine_constraints_voltage(struct regulator_dev *rdev, } if (target_min != current_uV || target_max != current_uV) { + rdev_info(rdev, "Bringing %duV into %d-%duV\n", + current_uV, target_min, target_max); ret = _regulator_do_set_voltage( rdev, target_min, target_max); if (ret < 0) { -- 2.34.1