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

Commit e35a5664 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "phy: qcom-ufs: remove failure when rx/tx_iface_clk are absence"

parents ba3a6808 b0512bf4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1227,8 +1227,8 @@
		#phy-cells = <0>;
		vdda-phy-supply = <&pm8994_l28>;
		vdda-pll-supply = <&pm8994_l12>;
		vdda-phy-max-microamp = <45000>;
		vdda-pll-max-microamp = <100>;
		vdda-phy-max-microamp = <18380>;
		vdda-pll-max-microamp = <9440>;
		vddp-ref-clk-supply = <&pm8994_l25>;
		vddp-ref-clk-max-microamp = <100>;
		vddp-ref-clk-always-on;
+19 −2
Original line number Diff line number Diff line
@@ -183,16 +183,27 @@ ufs_qcom_phy_init_clks(struct phy *generic_phy,
		       struct ufs_qcom_phy *phy_common)
{
	int err;
	struct ufs_qcom_phy *phy = get_ufs_qcom_phy(generic_phy);

	err = ufs_qcom_phy_clk_get(generic_phy, "tx_iface_clk",
				   &phy_common->tx_iface_clk);
	/*
	 * tx_iface_clk does not exist in newer version of ufs-phy HW,
	 * so don't return error if it is not found
	 */
	if (err)
		goto out;
		dev_dbg(phy->dev, "%s: failed to get tx_iface_clk\n",
			__func__);

	err = ufs_qcom_phy_clk_get(generic_phy, "rx_iface_clk",
				   &phy_common->rx_iface_clk);
	/*
	 * rx_iface_clk does not exist in newer version of ufs-phy HW,
	 * so don't return error if it is not found
	 */
	if (err)
		goto out;
		dev_dbg(phy->dev, "%s: failed to get rx_iface_clk\n",
			__func__);

	err = ufs_qcom_phy_clk_get(generic_phy, "ref_clk_src",
				   &phy_common->ref_clk_src);
@@ -483,6 +494,9 @@ int ufs_qcom_phy_enable_iface_clk(struct phy *generic_phy)
	if (phy->is_iface_clk_enabled)
		goto out;

	if (!phy->tx_iface_clk)
		goto out;

	ret = clk_prepare_enable(phy->tx_iface_clk);
	if (ret) {
		dev_err(phy->dev, "%s: tx_iface_clk enable failed %d\n",
@@ -508,6 +522,9 @@ void ufs_qcom_phy_disable_iface_clk(struct phy *generic_phy)
{
	struct ufs_qcom_phy *phy = get_ufs_qcom_phy(generic_phy);

	if (!phy->tx_iface_clk)
		return;

	if (phy->is_iface_clk_enabled) {
		clk_disable_unprepare(phy->tx_iface_clk);
		clk_disable_unprepare(phy->rx_iface_clk);