regulator: core: Log when we bring constraints into range
authorMark Brown <broonie@kernel.org>
Tue, 29 Mar 2016 23:33:42 +0000 (16:33 -0700)
committerMark Brown <broonie@kernel.org>
Tue, 29 Mar 2016 23:37:46 +0000 (16:37 -0700)
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>
drivers/regulator/core.c

index 881c37e61f7547120b0a07e07b4dce3ce459181d..18dd7ee61455d5487a84e1512d656fbe6c98ed72 100644 (file)
@@ -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) {