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

Commit 890712ad authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "clk: qcom: gdsc: Support for min operational vote on GDSC parent"

parents df1ee166 51b88b3b
Loading
Loading
Loading
Loading
+3 −9
Original line number 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
 * 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);
		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;
@@ -434,13 +435,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]);