From 8726e76f589c45aae4fe927570cc50d534528ecf Mon Sep 17 00:00:00 2001 From: Finley Xiao Date: Mon, 27 Aug 2018 17:43:05 +0800 Subject: [PATCH] Revert "regulator: of: Use regulator-init-microvolt as early minimum" This reverts commit a4e0323d131b00b4d12cbbda42a7ea32dc5d72b6. If uboot needs a high cpu rate, the voltage should be set to a high value, and the minimal voltage of regulator will also be set to this value during kernel startup, so it will be failed to set voltage which is less than this value when consumers change voltage, for example pvtm. This patch add a new 'regulator-early-min-microvolt' property to limit the minimal voltage of regulator during kernel startup and it will no longer be restricted by uboot. Change-Id: Ia50920b7627f886fab5c9f65a3fc19946debdff2 Signed-off-by: Finley Xiao --- Documentation/devicetree/bindings/regulator/regulator.txt | 5 ++--- drivers/regulator/of_regulator.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/regulator/regulator.txt b/Documentation/devicetree/bindings/regulator/regulator.txt index 653a1237c721..53931649e4d5 100644 --- a/Documentation/devicetree/bindings/regulator/regulator.txt +++ b/Documentation/devicetree/bindings/regulator/regulator.txt @@ -5,9 +5,8 @@ Optional properties: - regulator-min-microvolt: smallest voltage consumers may set - regulator-max-microvolt: largest voltage consumers may set - regulator-microvolt-offset: Offset applied to voltages to compensate for voltage drops -- regulator-init-microvolt: Set by bootloader or when initialising, in order to - make sure the voltage can suit the needs of all regulator consumers during - system startup. +- regulator-early-min-microvolt: minimum voltage during system startup, make sure we + select a voltage that suits the needs of all regulator consumers - regulator-min-microamp: smallest current consumers may set - regulator-max-microamp: largest current consumers may set - regulator-input-current-limit-microamp: maximum input current regulator allows diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c index ecb520b74b6c..9067049fa336 100644 --- a/drivers/regulator/of_regulator.c +++ b/drivers/regulator/of_regulator.c @@ -42,7 +42,7 @@ static void of_get_regulation_constraints(struct device_node *np, if (!of_property_read_u32(np, "regulator-max-microvolt", &pval)) constraints->max_uV = pval; - if (!of_property_read_u32(np, "regulator-init-microvolt", &pval)) + if (!of_property_read_u32(np, "regulator-early-min-microvolt", &pval)) constraints->early_min_uV = pval; /* Voltage change possible? */