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

Helps with figuring out when things went wrong.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
Mark Brown 2012-11-28 17:09:27 +00:00
parent 9489e9dcae
commit dd8004af2b

View File

@ -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;
}