Commit dd8004af authored by Mark Brown's avatar Mark Brown

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

Helps with figuring out when things went wrong.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 9489e9dc
...@@ -199,8 +199,11 @@ static int regulator_check_consumers(struct regulator_dev *rdev, ...@@ -199,8 +199,11 @@ static int regulator_check_consumers(struct regulator_dev *rdev,
*min_uV = regulator->min_uV; *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 -EINVAL;
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment