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

Commit 51b88b3b authored by Taniya Das's avatar Taniya Das Committed by Jagadeesh Kona
Browse files

clk: qcom: gdsc: 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 b7b02831
Loading
Loading
Loading
Loading
+3 −9
Original line number Original line Diff line number Diff line
/*
/*
 * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * it under the terms of the GNU General Public License version 2 and
@@ -422,7 +422,8 @@ static int gdsc_enable(struct regulator_dev *rdev)
		msm_bus_scale_client_update_request(sc->bus_handle, 0);
		msm_bus_scale_client_update_request(sc->bus_handle, 0);
		sc->is_bus_enabled = false;
		sc->is_bus_enabled = false;
	}
	}
	if (sc->parent_regulator)

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


	return ret;
	return ret;
@@ -434,13 +435,6 @@ static int gdsc_disable(struct regulator_dev *rdev)
	uint32_t regval;
	uint32_t regval;
	int i, ret = 0;
	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)
	if (sc->force_root_en)
		clk_prepare_enable(sc->clocks[sc->root_clk_idx]);
		clk_prepare_enable(sc->clocks[sc->root_clk_idx]);