summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2016-03-29 16:33:42 -0700
committerMark Brown <broonie@kernel.org>2016-03-29 16:37:46 -0700
commit45a91e8f767afbbffff46bf7251f81d15d121136 (patch)
treeb414b61131eab453b4236a42ab15e956cc8f7702
parentfa93fd4ecc9c58475abac6db93a797bff893bc16 (diff)
downloadlinux-45a91e8f767afbbffff46bf7251f81d15d121136.tar.bz2
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 <broonie@kernel.org>
-rw-r--r--drivers/regulator/core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 881c37e61f75..18dd7ee61455 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -935,6 +935,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) {