From dd8004af2b0e903b2ee9fce305cb615245fa12ee Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Wed, 28 Nov 2012 17:09:27 +0000 Subject: regulator: core: Log when a device causes a voltage constraint fail Helps with figuring out when things went wrong. Signed-off-by: Mark Brown diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index e872c8b..e7fffd1 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; } -- cgit v0.10.2 From fff15bef48e846d2670c86c95f8dbc3f84bbe866 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Tue, 27 Nov 2012 18:48:56 +0000 Subject: regulator: core: Say what unsupportable voltage constraints are Signed-off-by: Mark Brown diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index e7fffd1..7fbbd82 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -883,7 +883,9 @@ static int machine_constraints_voltage(struct regulator_dev *rdev, /* final: [min_uV..max_uV] valid iff constraints valid */ if (max_uV < min_uV) { - rdev_err(rdev, "unsupportable voltage constraints\n"); + rdev_err(rdev, + "unsupportable voltage constraints %u-%uuV\n", + min_uV, max_uV); return -EINVAL; } -- cgit v0.10.2