diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-11-28 12:09:27 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-11-28 12:47:18 -0500 |
commit | dd8004af2b0e903b2ee9fce305cb615245fa12ee (patch) | |
tree | 5a349a8d8ea825dc56b1d81d6d9246ec15af5a90 /drivers/regulator | |
parent | 9489e9dcae718d5fde988e4a684a0f55b5f94d17 (diff) |
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>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index e872c8be080..e7fffd15953 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
@@ -199,8 +199,11 @@ static int regulator_check_consumers(struct regulator_dev *rdev, | |||
199 | *min_uV = regulator->min_uV; | 199 | *min_uV = regulator->min_uV; |
200 | } | 200 | } |
201 | 201 | ||
202 | if (*min_uV > *max_uV) | 202 | if (*min_uV > *max_uV) { |
203 | dev_err(regulator->dev, "Restricting voltage, %u-%uuV\n", | ||
204 | regulator->min_uV, regulator->max_uV); | ||
203 | return -EINVAL; | 205 | return -EINVAL; |
206 | } | ||
204 | 207 | ||
205 | return 0; | 208 | return 0; |
206 | } | 209 | } |