aboutsummaryrefslogtreecommitdiff
path: root/drivers/thunderbolt/xdomain.c
diff options
context:
space:
mode:
authorGravatar Mika Westerberg <mika.westerberg@linux.intel.com> 2022-02-22 19:31:47 +0200
committerGravatar Mika Westerberg <mika.westerberg@linux.intel.com> 2022-09-05 09:02:16 +0300
commitd0f1e0c2a6990922818d6616a48d3d92bb7ddac1 (patch)
tree790dd5ce9dca0cc9a5631208d87041fa8c2d51be /drivers/thunderbolt/xdomain.c
parentthunderbolt: Add helper to check if CL states are enabled on port (diff)
downloadlinux-d0f1e0c2a6990922818d6616a48d3d92bb7ddac1.tar.gz
linux-d0f1e0c2a6990922818d6616a48d3d92bb7ddac1.tar.bz2
linux-d0f1e0c2a6990922818d6616a48d3d92bb7ddac1.zip
thunderbolt: Add support for receiver lane margining
USB4 spec defines standard set of registers to be used for receiver lane margining. This is useful for I/O interface quality and electrical robustness validation during manufacturing. Expose receiver lane margining through new debugfs directory "margining" that is added under each connected USB4 port. Users can then run the margining by writing to the exposed attributes under that directory. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/xdomain.c')
-rw-r--r--drivers/thunderbolt/xdomain.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/thunderbolt/xdomain.c b/drivers/thunderbolt/xdomain.c
index e4bbc4cb5f97..dcee91f25075 100644
--- a/drivers/thunderbolt/xdomain.c
+++ b/drivers/thunderbolt/xdomain.c
@@ -1435,6 +1435,8 @@ static int tb_xdomain_get_properties(struct tb_xdomain *xd)
if (xd->vendor_name && xd->device_name)
dev_info(&xd->dev, "%s %s\n", xd->vendor_name,
xd->device_name);
+
+ tb_xdomain_debugfs_init(xd);
} else {
kobject_uevent(&xd->dev.kobj, KOBJ_CHANGE);
}
@@ -1935,6 +1937,8 @@ static int unregister_service(struct device *dev, void *data)
*/
void tb_xdomain_remove(struct tb_xdomain *xd)
{
+ tb_xdomain_debugfs_remove(xd);
+
stop_handshake(xd);
device_for_each_child_reverse(&xd->dev, xd, unregister_service);