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

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

Merge "msm: kgsl: 'qcom,kgsl-3d0' device does not need to get regulators"

parents 3fbf87d4 eeb25214
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1783,11 +1783,11 @@ static bool regulators_left_on(struct kgsl_device *device)
	if (gmu_core_gpmu_isenabled(device))
		return false;

	if (!IS_ERR(pwr->cx_gdsc))
	if (!IS_ERR_OR_NULL(pwr->cx_gdsc))
		if (regulator_is_enabled(pwr->cx_gdsc))
			return true;

	if (!IS_ERR(pwr->gx_gdsc))
	if (!IS_ERR_OR_NULL(pwr->gx_gdsc))
		return regulator_is_enabled(pwr->gx_gdsc);

	return false;
+6 −3
Original line number Diff line number Diff line
@@ -1305,7 +1305,7 @@ static int enable_regulator(struct device *dev, struct regulator *regulator,
{
	int ret;

	if (IS_ERR(regulator))
	if (IS_ERR_OR_NULL(regulator))
		return 0;

	ret = regulator_enable(regulator);
@@ -1547,7 +1547,10 @@ int kgsl_pwrctrl_init(struct kgsl_device *device)

	_isense_clk_set_rate(pwr, pwr->num_pwrlevels - 1);

	if (of_property_read_bool(pdev->dev.of_node, "vddcx-supply"))
		pwr->cx_gdsc = devm_regulator_get(&pdev->dev, "vddcx");

	if (of_property_read_bool(pdev->dev.of_node, "vdd-supply"))
		pwr->gx_gdsc = devm_regulator_get(&pdev->dev, "vdd");

	pwr->power_flags = 0;
+4 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2020, The Linux Foundation. All rights reserved.
 */


@@ -17,6 +17,9 @@ bool kgsl_regulator_disable_wait(struct regulator *reg, u32 timeout)
{
	ktime_t tout = ktime_add_us(ktime_get(), timeout * 1000);

	if (IS_ERR_OR_NULL(reg))
		return true;

	regulator_disable(reg);

	for (;;) {