mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
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:
parent
9489e9dcae
commit
dd8004af2b
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue