lkml.org 
[lkml]   [2022]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4] thunderbolt: Add wake on connect/disconnect on USB4 ports
Hi,

On Wed, Sep 28, 2022 at 05:22:30PM +0530, Rajat Khandelwal wrote:
> Wake on connect/disconnect is only supported while runtime suspend
> for now, which is obviously necessary. Its also not inherently
> desired for the system to wakeup on thunderbolt hot events.
> However, we can still make user in control of waking up the system
> in the events of hot plug/unplug.
> This patch adds 'wakeup' attribute under 'usb4_portX/power' sysfs
> attribute and only enables wakes on connect/disconnect to the
> respective port when 'wakeup' is set to 'enabled'. The attribute
> is set to 'disabled' by default.
>
> Signed-off-by: Rajat Khandelwal <rajat.khandelwal@intel.com>
> ---
>
> Significant changes and reasons:
> 1. 'if (!port->cap_usb4)' is added under the loop in
> 'usb4_switch_check_wakes' function since the checks later are
> explicitly targeted to the USB4 port configuration capability.
> 'if (!tb_port_has_remote(port))' is removed because events now can
> be connection/disconnection along with USB4 events. Thus, a wake
> on connection can be triggered by user on the USB4 port (initially
> no remote).
> 2. Verified runtime wakeup. It works absolutely fine.
> 3. Wakeup count has to be increased in the 'wakeup_count' attribute
> under usb4_port/power, thus requiring another pm_wakeup_event.
>
> Fixes in v4:

Have you sent this patch previously upstream? I don't think so. So the
version number should be v1 (or ignored) and this changelog is not
needed either.

Also in future it is good to have link here to the previous versions of
the patch. I think all this is explained in
https://docs.kernel.org/process/index.html.

\
 
 \ /
  Last update: 2022-09-27 14:30    [W:0.031 / U:0.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site