Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a53c22e7 authored by Jack Pham's avatar Jack Pham Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarJack Pham <jackp@codeaurora.org>
parent c9cb2ef0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment