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

Commit a3b03798 authored by Yaniv Gardi's avatar Yaniv Gardi
Browse files

phy: phy-qcom-ufs: don't error out if some callbacks are not defined



Some callbacks may not be supported which is a valid case, and should not
be considered as error.
In such cases, and in order to reduce unnecessary logs, we better
remove this error messages.

Change-Id: I75b9e02a2189a330e0ca46387394be4a8c60ef5b
Signed-off-by: default avatarSubhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: default avatarYaniv Gardi <ygardi@codeaurora.org>
parent 91cab8ef
Loading
Loading
Loading
Loading
+2 −12
Original line number Diff line number Diff line
@@ -559,14 +559,9 @@ int ufs_qcom_phy_set_tx_lane_enable(struct phy *generic_phy, u32 tx_lanes)
	struct ufs_qcom_phy *ufs_qcom_phy = get_ufs_qcom_phy(generic_phy);
	int ret = 0;

	if (!ufs_qcom_phy->phy_spec_ops->set_tx_lane_enable) {
		dev_err(ufs_qcom_phy->dev, "%s: set_tx_lane_enable() callback is not supported\n",
			__func__);
		ret = -ENOTSUPP;
	} else {
	if (ufs_qcom_phy->phy_spec_ops->set_tx_lane_enable)
		ufs_qcom_phy->phy_spec_ops->set_tx_lane_enable(ufs_qcom_phy,
							       tx_lanes);
	}

	return ret;
}
@@ -577,13 +572,8 @@ int ufs_qcom_phy_ctrl_rx_linecfg(struct phy *generic_phy, bool ctrl)
	struct ufs_qcom_phy *ufs_qcom_phy = get_ufs_qcom_phy(generic_phy);
	int ret = 0;

	if (!ufs_qcom_phy->phy_spec_ops->ctrl_rx_linecfg) {
		dev_err(ufs_qcom_phy->dev, "%s: ctrl_rx_linecfg() callback is not supported\n",
			__func__);
		ret = -ENOTSUPP;
	} else {
	if (ufs_qcom_phy->phy_spec_ops->ctrl_rx_linecfg)
		ufs_qcom_phy->phy_spec_ops->ctrl_rx_linecfg(ufs_qcom_phy, ctrl);
	}

	return ret;
}