Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5bf243d2 authored by Taniya Das's avatar Taniya Das
Browse files

clk: qcom: gdsc: Add support for min operational vote on GDSC parent



For GDSCs that reside on domains that are collapsible and support a
minimum voltage of retention, explicitly vote on the minimal operating
voltage, LowSVS for the rail during enable and remove the vote before
disabling the regulator.

Change-Id: I3b2d414ae9696f9376136600f6160b96dd987fc7
Signed-off-by: default avatarTaniya Das <tdas@codeaurora.org>
parent 041ae774
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -371,7 +371,8 @@ static int gdsc_enable(struct regulator_dev *rdev)
		msm_bus_scale_client_update_request(sc->bus_handle, 0);
		sc->is_bus_enabled = false;
	}
	if (sc->parent_regulator)

	if (ret && sc->parent_regulator)
		regulator_set_voltage(sc->parent_regulator, 0, INT_MAX);

	return ret;
@@ -383,13 +384,6 @@ static int gdsc_disable(struct regulator_dev *rdev)
	uint32_t regval;
	int i, ret = 0;

	if (sc->parent_regulator) {
		ret = regulator_set_voltage(sc->parent_regulator,
				RPMH_REGULATOR_LEVEL_LOW_SVS, INT_MAX);
		if (ret)
			return ret;
	}

	if (sc->force_root_en)
		clk_prepare_enable(sc->clocks[sc->root_clk_idx]);