Re: [v15 5/6] usb: dwc3: qcom: Configure wakeup interrupts during suspend

From: Konrad Dybcio
Date: Fri May 16 2025 - 07:32:23 EST


On 5/5/22 10:56 AM, Krishna Kurapati wrote:
> From: Sandeep Maheswaram <quic_c_sanm@xxxxxxxxxxx>
>
> Configure DP/DM interrupts to detect line state changes based on
> hs_phy_mode. Enable the triggers opposite of what the current
> DP, DM levels. For HS/FS mode enable DM interrupt and for LS enable DP
> interrupt.

This is not what the patch does for FS

[...]

> + if (dwc->hs_phy_mode & PHY_MODE_USB_HOST_LS) {

to do so, this check should cover FS too

Konrad

> + dwc3_qcom_disable_wakeup_irq(qcom->dp_hs_phy_irq);
> + } else if (dwc->hs_phy_mode & PHY_MODE_USB_HOST_HS) {
> + dwc3_qcom_disable_wakeup_irq(qcom->dm_hs_phy_irq);
> + } else {
> + dwc3_qcom_disable_wakeup_irq(qcom->dp_hs_phy_irq);
> + dwc3_qcom_disable_wakeup_irq(qcom->dm_hs_phy_irq);
> + }
>
> dwc3_qcom_disable_wakeup_irq(qcom->ss_phy_irq);
> }
>
> static void dwc3_qcom_enable_interrupts(struct dwc3_qcom *qcom)
> {
> - dwc3_qcom_enable_wakeup_irq(qcom->hs_phy_irq);
> + struct dwc3 *dwc = platform_get_drvdata(qcom->dwc3);
>
> - dwc3_qcom_enable_wakeup_irq(qcom->dp_hs_phy_irq);
> + dwc3_qcom_enable_wakeup_irq(qcom->hs_phy_irq);
>
> - dwc3_qcom_enable_wakeup_irq(qcom->dm_hs_phy_irq);
> + if (dwc->hs_phy_mode & PHY_MODE_USB_HOST_LS) {
> + dwc3_qcom_enable_wakeup_irq(qcom->dp_hs_phy_irq);
> + } else if (dwc->hs_phy_mode & PHY_MODE_USB_HOST_HS) {
> + dwc3_qcom_enable_wakeup_irq(qcom->dm_hs_phy_irq);
> + } else {
> + dwc3_qcom_enable_wakeup_irq(qcom->dp_hs_phy_irq);
> + dwc3_qcom_enable_wakeup_irq(qcom->dm_hs_phy_irq);
> + }
>
> dwc3_qcom_enable_wakeup_irq(qcom->ss_phy_irq);
> }