[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9f2bdd43-da4c-47b2-bba5-d69bc0b06ac7@linaro.org>
Date: Mon, 11 Aug 2025 09:40:06 +0200
From: Neil Armstrong <neil.armstrong@...aro.org>
To: Konrad Dybcio <konradybcio@...nel.org>, Vinod Koul <vkoul@...nel.org>,
Kishon Vijay Abraham I <kishon@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
<conor+dt@...nel.org>, Bjorn Andersson <andersson@...nel.org>
Cc: Marijn Suijten <marijn.suijten@...ainline.org>,
linux-arm-msm@...r.kernel.org, linux-phy@...ts.infradead.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
Konrad Dybcio <konrad.dybcio@....qualcomm.com>,
Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
Subject: Re: [PATCH v4 2/6] phy: qcom: qmp-combo: Rename 'mode' to 'phy_mode'
On 07/08/2025 18:33, Konrad Dybcio wrote:
> From: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
>
> There are a numbers of ""modes"" involved: USB mode, Type-C mode (with
> its altmodes), phy_mode and QMP_PHY mode (DP/combo/USB/off).
>
> Rename the generic sounding 'mode' to 'phy_mode' to hopefully make
> the code easier to follow.
>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
> ---
> drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> index f07d097b129fb7b3fad003103b7468b16c1c4390..30749943f66280c3aa9e9673466f6f736d1adbc8 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> @@ -1846,7 +1846,7 @@ struct qmp_combo {
> int init_count;
>
> struct phy *usb_phy;
> - enum phy_mode mode;
> + enum phy_mode phy_mode;
> unsigned int usb_init_count;
>
> struct phy *dp_phy;
> @@ -3282,7 +3282,7 @@ static int qmp_combo_usb_set_mode(struct phy *phy, enum phy_mode mode, int submo
> {
> struct qmp_combo *qmp = phy_get_drvdata(phy);
>
> - qmp->mode = mode;
> + qmp->phy_mode = mode;
>
> return 0;
> }
> @@ -3311,8 +3311,8 @@ static void qmp_combo_enable_autonomous_mode(struct qmp_combo *qmp)
> void __iomem *pcs_misc = qmp->pcs_misc;
> u32 intr_mask;
>
> - if (qmp->mode == PHY_MODE_USB_HOST_SS ||
> - qmp->mode == PHY_MODE_USB_DEVICE_SS)
> + if (qmp->phy_mode == PHY_MODE_USB_HOST_SS ||
> + qmp->phy_mode == PHY_MODE_USB_DEVICE_SS)
> intr_mask = ARCVR_DTCT_EN | ALFPS_DTCT_EN;
> else
> intr_mask = ARCVR_DTCT_EN | ARCVR_DTCT_EVENT_SEL;
> @@ -3355,7 +3355,7 @@ static int __maybe_unused qmp_combo_runtime_suspend(struct device *dev)
> {
> struct qmp_combo *qmp = dev_get_drvdata(dev);
>
> - dev_vdbg(dev, "Suspending QMP phy, mode:%d\n", qmp->mode);
> + dev_vdbg(dev, "Suspending QMP phy, mode:%d\n", qmp->phy_mode);
>
> if (!qmp->init_count) {
> dev_vdbg(dev, "PHY not initialized, bailing out\n");
> @@ -3375,7 +3375,7 @@ static int __maybe_unused qmp_combo_runtime_resume(struct device *dev)
> struct qmp_combo *qmp = dev_get_drvdata(dev);
> int ret = 0;
>
> - dev_vdbg(dev, "Resuming QMP phy, mode:%d\n", qmp->mode);
> + dev_vdbg(dev, "Resuming QMP phy, mode:%d\n", qmp->phy_mode);
>
> if (!qmp->init_count) {
> dev_vdbg(dev, "PHY not initialized, bailing out\n");
>
Reviewed-by: Neil Armstrong <neil.armstrong@...aro.org>
Powered by blists - more mailing lists