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

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

Merge "ARM: dts: msm: keep UFS phy regulator always on for SM8150"

parents 565cf77f 9b9316e7
Loading
Loading
Loading
Loading
+2 −1
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
@@ -290,6 +290,7 @@
	compatible = "qcom,ufs-phy-qmp-v4";

	vdda-phy-supply = <&pm8150_l5>;
	vdda-phy-always-on;
	vdda-pll-supply = <&pm8150l_l3>;
	vdda-phy-max-microamp = <90200>;
	vdda-pll-max-microamp = <19000>;
+1 −0
Original line number Diff line number Diff line
@@ -265,6 +265,7 @@
	compatible = "qcom,ufs-phy-qmp-v4";

	vdda-phy-supply = <&pm8150_l5>;
	vdda-phy-always-on;
	vdda-pll-supply = <&pm8150l_l3>;
	vdda-phy-max-microamp = <90200>;
	vdda-pll-max-microamp = <19000>;
+1 −0
Original line number Diff line number Diff line
@@ -230,6 +230,7 @@
	compatible = "qcom,ufs-phy-qmp-v4";

	vdda-phy-supply = <&pm8150_l5>;
	vdda-phy-always-on;
	vdda-pll-supply = <&pm8150l_l3>;
	vdda-phy-max-microamp = <90200>;
	vdda-pll-max-microamp = <19000>;
+18 −1
Original line number Diff line number Diff line
@@ -455,9 +455,26 @@ static int ufs_qcom_phy_disable_vreg(struct device *dev,
{
	int ret = 0;

	if (!vreg || !vreg->enabled || vreg->is_always_on)
	if (!vreg || !vreg->enabled)
		goto out;

	if (vreg->is_always_on) {
		/* voting 0 uA load will keep regulator in LPM mode */
		ret = regulator_set_load(vreg->reg, 0);
		if (ret >= 0) {
			/*
			 * regulator_set_load() returns new regulator
			 * mode upon success.
			 */
			ret = 0;
		} else {
			dev_err(dev, "%s: %s set optimum mode(uA_load=0) failed, err=%d\n",
					__func__, vreg->name, ret);
		}

		goto out;
	}

	ret = regulator_disable(vreg->reg);

	if (!ret) {