usb: phy: qusb: Correctly configure interrupt mask in suspend
For peripheral or host bus suspend, currently the async PHY
interrupt is configured to trigger on D+ low, however that
is only correct for detecting high-speed resume. The interrupt
is level-triggered, so in the case of host bus suspend with no
peripherals attached (D+/D- both low), this would falsely lead
to a continuous interrupt/resume/suspend cycle.
In general, it would be better to have the interrupt trigger
upon a change in line state instead. To do this, first read the
current D+/D- state from the UTMI_STATUS register and enable the
high/low trigger opposite of what those values are. For example
if D+ is currently high and D- low (corresponding to HS 'J'/Suspend),
configure the mask to trigger on D+ low OR D- high.
Change-Id: I738065c047c0da4882eb83933cee8405682c25a4
Signed-off-by:
Jack Pham <jackp@codeaurora.org>
Loading
Please register or sign in to comment