thunderbolt: Enable wakes from system suspend
authorMika Westerberg <mika.westerberg@linux.intel.com>
Fri, 6 Dec 2019 16:36:07 +0000 (18:36 +0200)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Thu, 3 Sep 2020 09:06:42 +0000 (12:06 +0300)
commitb2911a593a705e54adde6d06d4657c1ff2f16583
tree41b38ef2522fa43490f3ddaaaf7ee73cda916268
parent341d45188a7800ae3bc18558d62020787b78397e
thunderbolt: Enable wakes from system suspend

In order for the router and the whole domain to wake up from system
suspend states we need to enable wakes for the connected routers. For
device routers we enable wakes from PCIe and USB 3.x. This allows
devices such as keyboards connected to USB 3.x hub that is tunneled to
wake the system up as expected. For all routers we enabled wake on USB4
for each connected ports. This is used to propagate the wake from router
to another.

Do the same for legacy routers through link controller vendor specific
registers as documented in USB4 spec chapter 13.

While there correct kernel-doc of usb4_switch_set_sleep() -- it does not
enable wakes instead there is a separate function (usb4_switch_set_wake())
that does.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/thunderbolt/domain.c
drivers/thunderbolt/lc.c
drivers/thunderbolt/nhi.c
drivers/thunderbolt/switch.c
drivers/thunderbolt/tb.h
drivers/thunderbolt/tb_regs.h
drivers/thunderbolt/usb4.c