From: Xiangxu Yin <xiangxu.yin@oss.qualcomm.com>
To: Rob Clark <robin.clark@oss.qualcomm.com>,
Dmitry Baryshkov <lumag@kernel.org>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Jessica Zhang <jessica.zhang@oss.qualcomm.com>,
Sean Paul <sean@poorly.run>,
Marijn Suijten <marijn.suijten@somainline.org>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Kuogee Hsieh <quic_khsieh@quicinc.com>,
Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>
Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org,
fange.zhang@oss.qualcomm.com, yongxing.mou@oss.qualcomm.com,
tingwei.zhang@oss.qualcomm.com,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
quic_lliu6@quicinc.com,
Xiangxu Yin <xiangxu.yin@oss.qualcomm.com>
Subject: [PATCH v3 03/14] phy: qcom: qmp-usbc: Rename USB-specific ops to prepare for DP support
Date: Wed, 20 Aug 2025 17:34:45 +0800 [thread overview]
Message-ID: <20250820-add-displayport-support-for-qcs615-platform-v3-3-a43bd25ec39c@oss.qualcomm.com> (raw)
In-Reply-To: <20250820-add-displayport-support-for-qcs615-platform-v3-0-a43bd25ec39c@oss.qualcomm.com>
To support following DisplayPort (DP) mode over the Type-C PHY, rename
USB-specific functions and ops to clearly separate them from common or
DP-related logic.
This is a preparatory cleanup to enable USB + DP dual mode.
Signed-off-by: Xiangxu Yin <xiangxu.yin@oss.qualcomm.com>
---
drivers/phy/qualcomm/phy-qcom-qmp-usbc.c | 50 ++++++++++++++++----------------
1 file changed, 25 insertions(+), 25 deletions(-)
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c b/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c
index 5e7fcb26744a4401c3076960df9c0dcbec7fdef7..e484caec2be20121cfe287c507b17af28fb9f211 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c
@@ -454,7 +454,7 @@ static const struct qmp_phy_cfg sdm660_usb3phy_cfg = {
.regs = qmp_v3_usb3phy_regs_layout_qcm2290,
};
-static int qmp_usbc_init(struct phy *phy)
+static int qmp_usbc_com_init(struct phy *phy)
{
struct qmp_usbc *qmp = phy_get_drvdata(phy);
const struct qmp_phy_cfg *cfg = qmp->cfg;
@@ -504,7 +504,7 @@ static int qmp_usbc_init(struct phy *phy)
return ret;
}
-static int qmp_usbc_exit(struct phy *phy)
+static int qmp_usbc_com_exit(struct phy *phy)
{
struct qmp_usbc *qmp = phy_get_drvdata(phy);
const struct qmp_phy_cfg *cfg = qmp->cfg;
@@ -518,7 +518,7 @@ static int qmp_usbc_exit(struct phy *phy)
return 0;
}
-static int qmp_usbc_power_on(struct phy *phy)
+static int qmp_usbc_usb_power_on(struct phy *phy)
{
struct qmp_usbc *qmp = phy_get_drvdata(phy);
const struct qmp_phy_cfg *cfg = qmp->cfg;
@@ -566,7 +566,7 @@ static int qmp_usbc_power_on(struct phy *phy)
return ret;
}
-static int qmp_usbc_power_off(struct phy *phy)
+static int qmp_usbc_usb_power_off(struct phy *phy)
{
struct qmp_usbc *qmp = phy_get_drvdata(phy);
const struct qmp_phy_cfg *cfg = qmp->cfg;
@@ -587,20 +587,20 @@ static int qmp_usbc_power_off(struct phy *phy)
return 0;
}
-static int qmp_usbc_enable(struct phy *phy)
+static int qmp_usbc_usb_enable(struct phy *phy)
{
struct qmp_usbc *qmp = phy_get_drvdata(phy);
int ret;
mutex_lock(&qmp->phy_mutex);
- ret = qmp_usbc_init(phy);
+ ret = qmp_usbc_com_init(phy);
if (ret)
goto out_unlock;
- ret = qmp_usbc_power_on(phy);
+ ret = qmp_usbc_usb_power_on(phy);
if (ret) {
- qmp_usbc_exit(phy);
+ qmp_usbc_com_exit(phy);
goto out_unlock;
}
@@ -611,19 +611,19 @@ static int qmp_usbc_enable(struct phy *phy)
return ret;
}
-static int qmp_usbc_disable(struct phy *phy)
+static int qmp_usbc_usb_disable(struct phy *phy)
{
struct qmp_usbc *qmp = phy_get_drvdata(phy);
int ret;
qmp->usb_init_count--;
- ret = qmp_usbc_power_off(phy);
+ ret = qmp_usbc_usb_power_off(phy);
if (ret)
return ret;
- return qmp_usbc_exit(phy);
+ return qmp_usbc_com_exit(phy);
}
-static int qmp_usbc_set_mode(struct phy *phy, enum phy_mode mode, int submode)
+static int qmp_usbc_usb_set_mode(struct phy *phy, enum phy_mode mode, int submode)
{
struct qmp_usbc *qmp = phy_get_drvdata(phy);
@@ -632,10 +632,10 @@ static int qmp_usbc_set_mode(struct phy *phy, enum phy_mode mode, int submode)
return 0;
}
-static const struct phy_ops qmp_usbc_phy_ops = {
- .init = qmp_usbc_enable,
- .exit = qmp_usbc_disable,
- .set_mode = qmp_usbc_set_mode,
+static const struct phy_ops qmp_usbc_usb_phy_ops = {
+ .init = qmp_usbc_usb_enable,
+ .exit = qmp_usbc_usb_disable,
+ .set_mode = qmp_usbc_usb_set_mode,
.owner = THIS_MODULE,
};
@@ -865,11 +865,11 @@ static int qmp_usbc_typec_switch_set(struct typec_switch_dev *sw,
qmp->orientation = orientation;
if (qmp->usb_init_count) {
- qmp_usbc_power_off(qmp->phy);
- qmp_usbc_exit(qmp->phy);
+ qmp_usbc_usb_power_off(qmp->phy);
+ qmp_usbc_com_exit(qmp->phy);
- qmp_usbc_init(qmp->phy);
- qmp_usbc_power_on(qmp->phy);
+ qmp_usbc_com_init(qmp->phy);
+ qmp_usbc_usb_power_on(qmp->phy);
}
mutex_unlock(&qmp->phy_mutex);
@@ -907,7 +907,7 @@ static int qmp_usbc_typec_switch_register(struct qmp_usbc *qmp)
}
#endif
-static int qmp_usbc_parse_dt_legacy(struct qmp_usbc *qmp, struct device_node *np)
+static int qmp_usbc_parse_usb_dt_legacy(struct qmp_usbc *qmp, struct device_node *np)
{
struct platform_device *pdev = to_platform_device(qmp->dev);
struct device *dev = qmp->dev;
@@ -969,7 +969,7 @@ static int qmp_usbc_parse_dt_legacy(struct qmp_usbc *qmp, struct device_node *np
return 0;
}
-static int qmp_usbc_parse_dt(struct qmp_usbc *qmp)
+static int qmp_usbc_parse_usb_dt(struct qmp_usbc *qmp)
{
struct platform_device *pdev = to_platform_device(qmp->dev);
const struct qmp_phy_cfg *cfg = qmp->cfg;
@@ -1075,10 +1075,10 @@ static int qmp_usbc_probe(struct platform_device *pdev)
/* Check for legacy binding with child node. */
np = of_get_child_by_name(dev->of_node, "phy");
if (np) {
- ret = qmp_usbc_parse_dt_legacy(qmp, np);
+ ret = qmp_usbc_parse_usb_dt_legacy(qmp, np);
} else {
np = of_node_get(dev->of_node);
- ret = qmp_usbc_parse_dt(qmp);
+ ret = qmp_usbc_parse_usb_dt(qmp);
}
if (ret)
goto err_node_put;
@@ -1097,7 +1097,7 @@ static int qmp_usbc_probe(struct platform_device *pdev)
if (ret)
goto err_node_put;
- qmp->phy = devm_phy_create(dev, np, &qmp_usbc_phy_ops);
+ qmp->phy = devm_phy_create(dev, np, &qmp_usbc_usb_phy_ops);
if (IS_ERR(qmp->phy)) {
ret = PTR_ERR(qmp->phy);
dev_err(dev, "failed to create PHY: %d\n", ret);
--
2.34.1
next prev parent reply other threads:[~2025-08-20 9:35 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-20 9:34 [PATCH v3 00/14] Add DisplayPort support for QCS615 platform Xiangxu Yin
2025-08-20 9:34 ` [PATCH v3 01/14] dt-bindings: display/msm: dp-controller: Add sm6150 Xiangxu Yin
2025-08-20 10:18 ` Dmitry Baryshkov
2025-08-28 4:51 ` Xiangxu Yin
2025-08-28 11:05 ` Dmitry Baryshkov
2025-09-01 12:32 ` Xiangxu Yin
2025-09-02 10:42 ` Konrad Dybcio
2025-09-04 0:34 ` Dmitry Baryshkov
2025-08-20 9:34 ` [PATCH v3 02/14] dt-bindings: phy: Add QMP USB3+DP PHY for QCS615 Xiangxu Yin
2025-08-20 10:09 ` Dmitry Baryshkov
2025-08-22 6:44 ` Xiangxu Yin
2025-08-20 11:37 ` Dmitry Baryshkov
2025-08-22 6:48 ` Xiangxu Yin
2025-08-22 14:22 ` Rob Herring
2025-08-22 18:20 ` Dmitry Baryshkov
2025-09-01 12:38 ` Xiangxu Yin
2025-08-20 9:34 ` Xiangxu Yin [this message]
2025-08-20 11:46 ` [PATCH v3 03/14] phy: qcom: qmp-usbc: Rename USB-specific ops to prepare for DP support Dmitry Baryshkov
2025-08-20 9:34 ` [PATCH v3 04/14] phy: qcom: qmp-usbc: Add USBC PHY type enum Xiangxu Yin
2025-08-20 11:34 ` Dmitry Baryshkov
2025-08-22 6:49 ` Xiangxu Yin
2025-08-20 9:34 ` [PATCH v3 05/14] phy: qcom: qmp-usbc: Add DP-related fields for USB/DP switchable PHY Xiangxu Yin
2025-08-20 11:47 ` Dmitry Baryshkov
2025-08-22 6:59 ` Xiangxu Yin
2025-08-22 9:05 ` Dmitry Baryshkov
2025-08-20 9:34 ` [PATCH v3 06/14] phy: qcom: qmp-usbc: Add QCS615 DP PHY configuration and init data Xiangxu Yin
2025-08-20 11:25 ` Dmitry Baryshkov
2025-08-22 7:20 ` Xiangxu Yin
2025-08-20 9:34 ` [PATCH v3 07/14] phy: qcom: qmp-usbc: Move reset and regulator config into PHY cfg Xiangxu Yin
2025-08-20 11:30 ` Dmitry Baryshkov
2025-08-22 8:29 ` Xiangxu Yin
2025-08-22 10:08 ` Dmitry Baryshkov
2025-08-27 13:28 ` Xiangxu Yin
2025-08-27 14:31 ` Dmitry Baryshkov
2025-08-28 1:40 ` Xiangxu Yin
2025-08-28 12:57 ` Dmitry Baryshkov
2025-08-20 9:34 ` [PATCH v3 08/14] phy: qcom: qmp-usbc: Add DP PHY configuration support for QCS615 Xiangxu Yin
2025-08-20 11:16 ` Dmitry Baryshkov
2025-08-22 8:43 ` Xiangxu Yin
2025-08-22 10:09 ` Dmitry Baryshkov
2025-08-20 9:34 ` [PATCH v3 09/14] phy: qcom: qmp-usbc: Add DP PHY ops for USB/DP switchable Type-C PHYs Xiangxu Yin
2025-08-20 11:45 ` Dmitry Baryshkov
2025-08-27 12:17 ` Xiangxu Yin
2025-08-27 16:12 ` Dmitry Baryshkov
2025-08-20 9:34 ` [PATCH v3 10/14] phy: qcom: qmp-usbc: Add TCSR parsing and USB/DP mode mutex handling Xiangxu Yin
2025-08-20 11:24 ` Dmitry Baryshkov
2025-08-27 12:23 ` Xiangxu Yin
2025-08-20 9:34 ` [PATCH v3 11/14] phy: qcom: qmp-usbc: Finalize USB/DP switchable PHY support Xiangxu Yin
2025-08-20 11:42 ` Dmitry Baryshkov
2025-08-27 12:34 ` Xiangxu Yin
2025-08-27 16:14 ` Dmitry Baryshkov
2025-08-28 2:37 ` Xiangxu Yin
2025-08-20 9:34 ` [PATCH v3 12/14] phy: qcom: qmp-usbc: Add QCS615 DP PHY compatible Xiangxu Yin
2025-08-20 9:34 ` [PATCH v3 13/14] drm/msm/dp: Add DisplayPort support for sm6150 Xiangxu Yin
2025-08-20 9:34 ` [PATCH v3 14/14] drm/msm/dp: Add support for lane mapping configuration Xiangxu Yin
2025-08-20 11:49 ` Dmitry Baryshkov
2025-08-27 12:35 ` Xiangxu Yin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250820-add-displayport-support-for-qcs615-platform-v3-3-a43bd25ec39c@oss.qualcomm.com \
--to=xiangxu.yin@oss.qualcomm.com \
--cc=abhinav.kumar@linux.dev \
--cc=airlied@gmail.com \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=fange.zhang@oss.qualcomm.com \
--cc=freedreno@lists.freedesktop.org \
--cc=jessica.zhang@oss.qualcomm.com \
--cc=kishon@kernel.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=lumag@kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=marijn.suijten@somainline.org \
--cc=mripard@kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=quic_khsieh@quicinc.com \
--cc=quic_lliu6@quicinc.com \
--cc=robh@kernel.org \
--cc=robin.clark@oss.qualcomm.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
--cc=tingwei.zhang@oss.qualcomm.com \
--cc=tzimmermann@suse.de \
--cc=vkoul@kernel.org \
--cc=yongxing.mou@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).