summaryrefslogtreecommitdiff
path: root/drivers/thunderbolt/lc.c
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@dell.com>2020-06-23 11:14:29 -0500
committerMika Westerberg <mika.westerberg@linux.intel.com>2020-07-01 13:51:49 +0300
commit1cb36293833766e048cba2026dd860687a2851d9 (patch)
tree1922fd625b49827fb65cccd15469e1359b867491 /drivers/thunderbolt/lc.c
parent4b794f8066e84818c172c81024f1d61071f14710 (diff)
thunderbolt: Add support for authenticate on disconnect
Some external devices can support completing thunderbolt authentication when they are unplugged. For this to work though, the link controller must remain operational. The only device known to support this right now is the Dell WD19TB, so add a quirk for this. Signed-off-by: Mario Limonciello <mario.limonciello@dell.com> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/lc.c')
-rw-r--r--drivers/thunderbolt/lc.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/thunderbolt/lc.c b/drivers/thunderbolt/lc.c
index bd44d50246d2..19be627d090f 100644
--- a/drivers/thunderbolt/lc.c
+++ b/drivers/thunderbolt/lc.c
@@ -366,3 +366,17 @@ int tb_lc_dp_sink_dealloc(struct tb_switch *sw, struct tb_port *in)
tb_port_dbg(in, "sink %d de-allocated\n", sink);
return 0;
}
+
+/**
+ * tb_lc_force_power() - Forces LC to be powered on
+ * @sw: Thunderbolt switch
+ *
+ * This is useful to let authentication cycle pass even without
+ * a Thunderbolt link present.
+ */
+int tb_lc_force_power(struct tb_switch *sw)
+{
+ u32 in = 0xffff;
+
+ return tb_sw_write(sw, &in, TB_CFG_SWITCH, TB_LC_POWER, 1);
+}