X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=cmd%2Fregulator.c;h=ed8d778c8243b3186e4d6578e9955de632c17975;hb=7b5b9343139f934f1ce876e9466c065f20c8265c;hp=bfea6e04b6746dbb5d8efaa26073761ad9d390f9;hpb=2e192b245ed36a63bab0ef576999a95e23f60ecd;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);