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

Commit f9b0ee99 authored by Yaniv Gardi's avatar Yaniv Gardi Committed by Gerrit - the friendly Code Review server
Browse files

phy: qcom-ufs: remove hard-coded vdda-phy voltage definition



This patch removes the hard-coded voltage number of vdda-phy regulator
and instead, gets it by using the appropriate API.

Change-Id: Iab753c7e94424dd3ccce95296258bba264979cf2
Signed-off-by: default avatarYaniv Gardi <ygardi@codeaurora.org>
parent d837ea84
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@
#include "phy-qcom-ufs-qmp-14nm.h"

#define UFS_PHY_NAME "ufs_phy_qmp_14nm"
#define UFS_PHY_VDDA_PHY_UV	(925000)

static
int ufs_qcom_phy_qmp_14nm_phy_calibrate(struct ufs_qcom_phy *ufs_qcom_phy,
@@ -94,8 +93,6 @@ static int ufs_qcom_phy_qmp_14nm_init(struct phy *generic_phy)
			__func__, err);
		goto out;
	}
	phy_common->vdda_phy.max_uV = UFS_PHY_VDDA_PHY_UV;
	phy_common->vdda_phy.min_uV = UFS_PHY_VDDA_PHY_UV;

	ufs_qcom_phy_qmp_14nm_advertise_quirks(phy_common);

+5 −1
Original line number Diff line number Diff line
@@ -230,6 +230,7 @@ ufs_qcom_phy_init_vregulators(struct phy *generic_phy,
			      struct ufs_qcom_phy *phy_common)
{
	int err;
	int vdda_phy_uV;

	err = ufs_qcom_phy_init_vreg(generic_phy, &phy_common->vdda_pll,
		"vdda-pll");
@@ -238,10 +239,13 @@ ufs_qcom_phy_init_vregulators(struct phy *generic_phy,

	err = ufs_qcom_phy_init_vreg(generic_phy, &phy_common->vdda_phy,
		"vdda-phy");

	if (err)
		goto out;

	vdda_phy_uV = regulator_get_voltage(phy_common->vdda_phy.reg);
	phy_common->vdda_phy.max_uV = vdda_phy_uV;
	phy_common->vdda_phy.min_uV = vdda_phy_uV;

	/* vddp-ref-clk-* properties are optional */
	__ufs_qcom_phy_init_vreg(generic_phy, &phy_common->vddp_ref_clk,
				 "vddp-ref-clk", true);