On 07/08/2025 18:33, Konrad Dybcio wrote:
> From: Konrad Dybcio <konrad.dybcio@oss.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@oss.qualcomm.com>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.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@linaro.org>