diff options
author | Mario Limonciello <mario.limonciello@dell.com> | 2020-06-23 18:14:29 +0200 |
---|---|---|
committer | Mika Westerberg <mika.westerberg@linux.intel.com> | 2020-07-01 12:51:49 +0200 |
commit | 1cb36293833766e048cba2026dd860687a2851d9 (patch) | |
tree | 1922fd625b49827fb65cccd15469e1359b867491 /drivers/thunderbolt/lc.c | |
parent | thunderbolt: Add support for separating the flush to SPI and authenticate (diff) | |
download | linux-1cb36293833766e048cba2026dd860687a2851d9.tar.xz linux-1cb36293833766e048cba2026dd860687a2851d9.zip |
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.c | 14 |
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); +} |