Skip to contentSkip to conversation

regulator: core: Log when we bring constraints into range

PATCH New Mark Brown 1 participant 1 message Mar 29, 2016 Voltage and current regulator framework

lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

PATCH 1/1 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.

---
 drivers/regulator/core.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/regulator/core.c +2 -0
index 881c37e61f75..18dd7ee61455 100644
@@ -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) {
Signature · 1 line
2.8.0.rc3