summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/core.c
diff options
context:
space:
mode:
authorMark Brown2012-11-28 18:09:27 +0100
committerMark Brown2012-11-28 18:47:18 +0100
commitdd8004af2b0e903b2ee9fce305cb615245fa12ee (patch)
tree5a349a8d8ea825dc56b1d81d6d9246ec15af5a90 /drivers/regulator/core.c
parentLinux 3.7-rc7 (diff)
downloadkernel-qcow2-linux-dd8004af2b0e903b2ee9fce305cb615245fa12ee.tar.gz
kernel-qcow2-linux-dd8004af2b0e903b2ee9fce305cb615245fa12ee.tar.xz
kernel-qcow2-linux-dd8004af2b0e903b2ee9fce305cb615245fa12ee.zip
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/core.c')
-rw-r--r--drivers/regulator/core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index e872c8be080e..e7fffd15953f 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -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;
}