RE: [PATCH] thunderbolt: Supporting wake on DP hot events behind TBT/USB4 routers

From: Khandelwal, Rajat
Date: Wed Aug 03 2022 - 03:29:50 EST


+Abhijeet
@Benson Leung @Malani, Prashant Please provide your comments.

-----Original Message-----
From: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>
Sent: Wednesday, August 3, 2022 11:07 AM
To: Khandelwal, Rajat <rajat.khandelwal@xxxxxxxxx>
Cc: andreas.noever@xxxxxxxxx; Jamet, Michael <michael.jamet@xxxxxxxxx>; YehezkelShB@xxxxxxxxx; linux-usb@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Malani, Prashant <pmalani@xxxxxxxxxx>; bleung@xxxxxxxxxx
Subject: Re: [PATCH] thunderbolt: Supporting wake on DP hot events behind TBT/USB4 routers

Hi,

On Wed, Aug 03, 2022 at 06:31:39AM +0530, Rajat Khandelwal wrote:
> Current implementation doesn't allow user to go into system suspend
> and simultaneously project the screen on an external display connected
> to a TBT/USB4 device. This patch enables this feature.
>
> Let me know what you think about this.

Please prefix patches to follow the sybsystem style. For Thunderbolt it
should be "thunderbolt: ....".

This will cause any monitor plug to wake up the system and I'm not sure
we want that, at least to be default behaviour. If you have a regular
Type-C (non-USB4/TBT) dock and you plug in a monitor to that, does it
wake up?

IIRC I already suggested you to do this for the USB4 ports themselves
(struct usb4_port) so that userspace can make them wake up the system on
any event by writing "enabled > .../wakeup" which is the normal way.