[PATCH 1/3] phy: qcom-qmp-usb-ss: add shared SS-link-state submode contract

sashiko-bot at kernel.org sashiko-bot at kernel.org
Fri Nov 6 00:42:12 PST 2026


Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] phy: qcom-qmp-usb-ss: redundant submode enum duplicating enum
  phy_mode
--

commit 2f108759619603815653af9584eea10cfa75efab
Author: Tapas Rana <tapas.rana at oss.qualcomm.com>

phy: qcom-qmp-usb-ss: add shared SS-link-state submode contract

This commit adds include/linux/phy/phy-qcom-qmp-usb-ss.h with enum
qcom_usb_ss_state to pass SuperSpeed link presence via the submode
argument of phy_set_mode_ext().

> diff --git a/include/linux/phy/phy-qcom-qmp-usb-ss.h b/include/linux/phy/phy-qcom-qmp-usb-ss.h
> new file mode 100644
> index 0000000000000..4da4d71e977d7
> --- /dev/null
> +++ b/include/linux/phy/phy-qcom-qmp-usb-ss.h
> @@ -0,0 +1,17 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * Shared submode contract between dwc3-qcom glue and the Qualcomm QMP
> + * USB3/combo PHY driver for communicating live SuperSpeed link presence
> + * at suspend-entry, via phy_set_mode_ext()'s submode argument.
> + */
> +
> +#ifndef _PHY_QCOM_QMP_USB_SS_H_
> +#define _PHY_QCOM_QMP_USB_SS_H_
> +
> +enum qcom_usb_ss_state {
> +	QCOM_USB_SS_UNKNOWN = 0,
> +	QCOM_USB_SS_PRESENT,
> +	QCOM_USB_SS_ABSENT,
> +};
> +
> +#endif /* _PHY_QCOM_QMP_USB_SS_H_ */

[Severity: Low]
Is a new vendor-specific submode header needed when enum phy_mode in
include/linux/phy/phy.h already defines PHY_MODE_USB_HOST_SS and
PHY_MODE_USB_DEVICE_SS for this purpose?

The Qualcomm QMP PHY drivers (including phy-qcom-qmp-combo.c and
phy-qcom-qmp-usb.c) already check for PHY_MODE_USB_HOST_SS and
PHY_MODE_USB_DEVICE_SS to select the autonomous-mode wake interrupt mask:

drivers/phy/qualcomm/phy-qcom-qmp-combo.c:qmp_combo_enable_autonomous_mode() {
	...
	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;
	...
}

Passing PHY_MODE_USB_HOST_SS or PHY_MODE_USB_DEVICE_SS when a SuperSpeed
link is present and the base PHY_MODE_USB_HOST or PHY_MODE_USB_DEVICE
mode when it is absent (or unknown) would avoid introducing a duplicate
Qualcomm-specific submode contract under include/linux/phy/ and keep all
QMP USB PHY drivers consistent.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261106082716.128968-1-tapas.rana@oss.qualcomm.com?part=1



More information about the linux-phy mailing list