summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-07-02 18:16:07 -0600
committerSimon Glass <sjg@chromium.org>2015-08-05 21:06:13 -0600
commit224d1ddcc5fa18d88e2c735778c39b8df61016ea (patch)
tree3655f2f51ae0ae14435b6d0c8d4ec332a016e7bd /common
parentd08504d18a0a6af2ba6171a4a3e71a032d2836b6 (diff)
dm: pmic: Display the regulator limits on error
When a regulator command cannot honour the requested voltage, display the limits to try to be helpful. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
Diffstat (limited to 'common')
-rw-r--r--common/cmd_regulator.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/cmd_regulator.c b/common/cmd_regulator.c
index 6149d1ee440..793f08e81a9 100644
--- a/common/cmd_regulator.c
+++ b/common/cmd_regulator.c
@@ -241,7 +241,8 @@ static int do_value(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
value = simple_strtoul(argv[1], NULL, 0);
if ((value < uc_pdata->min_uV || value > uc_pdata->max_uV) && !force) {
- printf("Value exceeds regulator constraint limits\n");
+ printf("Value exceeds regulator constraint limits %d..%d uV\n",
+ uc_pdata->min_uV, uc_pdata->max_uV);
return CMD_RET_FAILURE;
}