usb: dwc3-am62: Fix up wake-up configuration and spurious wake up
authorRoger Quadros <rogerq@kernel.org>
Fri, 24 Mar 2023 11:44:29 +0000 (13:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Mar 2023 07:02:31 +0000 (09:02 +0200)
commit2926c5275028e44f6a2ac31b37d75d6d6e260306
tree01f4112b41f48eac6277759eda27347c6af42e89
parentdb2c2b161d4a8f4a81e6f643848b1531517a67a5
usb: dwc3-am62: Fix up wake-up configuration and spurious wake up

Explicitly set and clear wakeup config so we don't leave anything
to chance.

Clear wakeup status on suspend so we know what caused wake up.

The LINESTATE wake up should not be enabled in device mode
if we are not connected to a USB host and in USB suspend (U2/L3)
else it will cause spurious wake up.

For now, don't enable LINESTATE. This means wake up from
USB resume will not work but at least we won't have any spurious
wake ups.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/20230324114429.21838-1-rogerq@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/dwc3-am62.c