From: Mark Brown Date: Tue, 11 Dec 2018 20:44:49 +0000 (+0000) Subject: Merge branch 'for-linus' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie... X-Git-Tag: v5.0-rc1~175^2~1^2~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e6202e8249aa7115af65f2d80b43c132816224ef;p=thirdparty%2Fkernel%2Flinux.git Merge branch 'for-linus' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-4.21 --- e6202e8249aa7115af65f2d80b43c132816224ef diff --cc drivers/regulator/core.c index 79cb090ff22f6,6e146102fd938..ae0a559d19783 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@@ -1342,25 -1156,8 +1342,14 @@@ static int set_machine_constraints(stru rdev_err(rdev, "failed to set initial mode: %d\n", ret); return ret; } + } else if (rdev->constraints->system_load) { + /* + * We'll only apply the initial system load if an + * initial mode wasn't specified. + */ + drms_uA_update(rdev); } - /* If the constraints say the regulator should be on at this point - * and we have control then make sure it is enabled. - */ - if (rdev->constraints->always_on || rdev->constraints->boot_on) { - ret = _regulator_do_enable(rdev); - if (ret < 0 && ret != -EINVAL) { - rdev_err(rdev, "failed to enable\n"); - return ret; - } - } - if ((rdev->constraints->ramp_delay || rdev->constraints->ramp_disable) && ops->set_ramp_delay) { ret = ops->set_ramp_delay(rdev, rdev->constraints->ramp_delay);