diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2021-01-14 15:44:17 +0100 |
---|---|---|
committer | Mika Westerberg <mika.westerberg@linux.intel.com> | 2021-05-31 13:39:52 +0200 |
commit | 6026b703e8f61bf9c395bb286fa3b46956ce0496 (patch) | |
tree | 90f235d735fd87cab12630c017c761688411e569 /drivers/thunderbolt/lc.c | |
parent | Documentation / thunderbolt: Clean up entries (diff) | |
download | linux-6026b703e8f61bf9c395bb286fa3b46956ce0496.tar.xz linux-6026b703e8f61bf9c395bb286fa3b46956ce0496.zip |
thunderbolt: Add wake from DisplayPort
Latest USB4 spec added a new wake bit for DisplayPort so add this to the
driver when runtime suspending. This way wake up the domain when a new
monitor is plugged in to any of the device routers.
Also do the same for pre-USB4 devices through the link controller
registers as documented in chapter 13 of the USB4 spec.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/lc.c')
-rw-r--r-- | drivers/thunderbolt/lc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/thunderbolt/lc.c b/drivers/thunderbolt/lc.c index bc671730a11f..c178f0d7beab 100644 --- a/drivers/thunderbolt/lc.c +++ b/drivers/thunderbolt/lc.c @@ -208,8 +208,8 @@ static int tb_lc_set_wake_one(struct tb_switch *sw, unsigned int offset, if (ret) return ret; - ctrl &= ~(TB_LC_SX_CTRL_WOC | TB_LC_SX_CTRL_WOD | TB_LC_SX_CTRL_WOP | - TB_LC_SX_CTRL_WOU4); + ctrl &= ~(TB_LC_SX_CTRL_WOC | TB_LC_SX_CTRL_WOD | TB_LC_SX_CTRL_WODPC | + TB_LC_SX_CTRL_WODPD | TB_LC_SX_CTRL_WOP | TB_LC_SX_CTRL_WOU4); if (flags & TB_WAKE_ON_CONNECT) ctrl |= TB_LC_SX_CTRL_WOC | TB_LC_SX_CTRL_WOD; @@ -217,6 +217,8 @@ static int tb_lc_set_wake_one(struct tb_switch *sw, unsigned int offset, ctrl |= TB_LC_SX_CTRL_WOU4; if (flags & TB_WAKE_ON_PCIE) ctrl |= TB_LC_SX_CTRL_WOP; + if (flags & TB_WAKE_ON_DP) + ctrl |= TB_LC_SX_CTRL_WODPC | TB_LC_SX_CTRL_WODPD; return tb_sw_write(sw, &ctrl, TB_CFG_SWITCH, offset + TB_LC_SX_CTRL, 1); } |