summaryrefslogtreecommitdiff
path: root/drivers/thunderbolt/debugfs.c
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2024-12-21 14:52:43 +0200
committerMika Westerberg <mika.westerberg@linux.intel.com>2025-01-05 10:35:03 +0200
commit43d84701d2aa147eab39b529919ffaf35f724bbb (patch)
tree58560c8749e19270ef98494032357267fb8898b1 /drivers/thunderbolt/debugfs.c
parentd6d458d42e1e1544a18f37f1d5c840e00d5261b9 (diff)
thunderbolt: Expose router DROM through debugfs
Router DROM contains information that might be usable for development and debugging purposes. For example when new entries are added to the USB4 spec it is useful to be able to look for them without need to change the kernel. For this reason expose the DROM through debugfs. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/debugfs.c')
-rw-r--r--drivers/thunderbolt/debugfs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/thunderbolt/debugfs.c b/drivers/thunderbolt/debugfs.c
index fa61127b2c47..f8328ca7e22e 100644
--- a/drivers/thunderbolt/debugfs.c
+++ b/drivers/thunderbolt/debugfs.c
@@ -2413,6 +2413,8 @@ void tb_switch_debugfs_init(struct tb_switch *sw)
sw->debugfs_dir = debugfs_dir;
debugfs_create_file("regs", DEBUGFS_MODE, debugfs_dir, sw,
&switch_regs_fops);
+ if (sw->drom)
+ debugfs_create_blob("drom", 0400, debugfs_dir, &sw->drom_blob);
tb_switch_for_each_port(sw, port) {
struct dentry *debugfs_dir;