Skip to contentSkip to conversation

regulator: core: Log when a device causes a voltage constraint fail

PATCH New Mark Brown 1 participant 1 message Nov 28, 2012 Voltage and current regulator framework

lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 regulator: core: Log when a device causes a voltage constraint fail

Helps with figuring out when things went wrong.

---
 drivers/regulator/core.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/regulator/core.c +4 -1
index fe4a1b6..af97b62 100644
@@ -199,8 +199,11 @@ static int regulator_check_consumers(struct regulator_dev *rdev,
 			*min_uV = regulator->min_uV;
 	}
 
-	if (*min_uV > *max_uV)
+	if (*min_uV > *max_uV) {
+		dev_err(regulator->dev, "Restricting voltage, %u-%uuV\n",
+			regulator->min_uV, regulator->max_uV);
 		return -EINVAL;
+	}
 
 	return 0;
 }
Signature · 1 line
1.7.10.4