diff options
author | Keerthy <j-keerthy@ti.com> | 2016-10-26 13:42:30 +0530 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-11-25 10:00:04 -0700 |
commit | 2f5d532f3b8a7697dc1b5700000b1e350323d50c (patch) | |
tree | 07e3089822b28a37bf0f0264c273094763d778cb /cmd | |
parent | 543bd27353d2c5679057fe09aa2d02259687ff32 (diff) | |
download | u-boot-imx-2f5d532f3b8a7697dc1b5700000b1e350323d50c.zip u-boot-imx-2f5d532f3b8a7697dc1b5700000b1e350323d50c.tar.gz u-boot-imx-2f5d532f3b8a7697dc1b5700000b1e350323d50c.tar.bz2 |
power: regulator: Introduce regulator_set_value_force function
In case we want to force a particular value on a regulator
irrespective of the min/max constraints for testing purposes
one can call regulator_set_value_force function.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/regulator.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/regulator.c b/cmd/regulator.c index bfea6e0..2ef5bc9 100644 --- a/cmd/regulator.c +++ b/cmd/regulator.c @@ -292,7 +292,10 @@ static int do_value(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return CMD_RET_FAILURE; } - ret = regulator_set_value(dev, value); + if (!force) + ret = regulator_set_value(dev, value); + else + ret = regulator_set_value_force(dev, value); if (ret) { printf("Regulator: %s - can't set the Voltage!\n", uc_pdata->name); |