From mboxrd@z Thu Jan 1 00:00:00 1970
From: Przemyslaw Marczak
Date: Fri, 10 Jul 2015 13:54:10 +0200
Subject: [U-Boot] [PATCH 30/55] dm: pmic: Display the regulator limits
on error
In-Reply-To: <1435882592-487-31-git-send-email-sjg@chromium.org>
References: <1435882592-487-1-git-send-email-sjg@chromium.org>
<1435882592-487-31-git-send-email-sjg@chromium.org>
Message-ID: <559FB262.1060602@samsung.com>
List-Id:
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
To: u-boot@lists.denx.de
Hello Simon,
On 07/03/2015 02:16 AM, Simon Glass wrote:
> When a regulator command cannot honour the requested voltage, display the
> limits to try to be helpful.
>
> Signed-off-by: Simon Glass
> ---
>
> common/cmd_regulator.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/common/cmd_regulator.c b/common/cmd_regulator.c
> index 6149d1e..2d8579b 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");
Could you please also add printing the 'uV' unit?
> + printf("Value exceeds regulator constraint limits %d..%d\n",
> + uc_pdata->min_uV, uc_pdata->max_uV);
> return CMD_RET_FAILURE;
> }
>
>
Acked-by: Przemyslaw Marczak
Regards
--
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com