X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=cmd%2Fregulator.c;h=ed8d778c8243b3186e4d6578e9955de632c17975;hb=4f17d8d391f2ba2b5d2496cb1c2c451fd786a53b;hp=bfea6e04b6746dbb5d8efaa26073761ad9d390f9;hpb=2218c54bc13c8045903afc05d1364439a230da1f;p=oweals%2Fu-boot.git
diff --git a/cmd/regulator.c b/cmd/regulator.c
index bfea6e04b6..ed8d778c82 100644
--- a/cmd/regulator.c
+++ b/cmd/regulator.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2014-2015 Samsung Electronics
* Przemyslaw Marczak
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include
#include
@@ -71,7 +70,7 @@ static int curr_dev_and_platdata(struct udevice **devp,
*uc_pdata = dev_get_uclass_platdata(*devp);
if (!*uc_pdata) {
- error("Regulator: %s - missing platform data!", currdev->name);
+ pr_err("Regulator: %s - missing platform data!\n", currdev->name);
return CMD_RET_FAILURE;
}
@@ -292,7 +291,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);