]> www.infradead.org Git - users/hch/misc.git/commitdiff
phy: qcom: qmp-combo: Rename 'mode' to 'phy_mode'
authorKonrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Thu, 7 Aug 2025 16:33:20 +0000 (18:33 +0200)
committerVinod Koul <vkoul@kernel.org>
Wed, 20 Aug 2025 16:49:08 +0000 (22:19 +0530)
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@oss.qualcomm.com>
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on Lenovo Thinkpad T14S
Link: https://lore.kernel.org/r/20250807-topic-4ln_dp_respin-v4-2-43272d6eca92@oss.qualcomm.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/qualcomm/phy-qcom-qmp-combo.c

index f07d097b129fb7b3fad003103b7468b16c1c4390..30749943f66280c3aa9e9673466f6f736d1adbc8 100644 (file)
@@ -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");