>+struct debug_buffer {This is a lot more stuff than just debug port, it should be in sysfs
>+ ssize_t (*fill_func)(struct debug_buffer *);
>+ struct usb_bus *bus;
>+ struct mutex mutex;
>+ size_t count;
>+ char *output_buf;
>+ size_t alloc_size;
>+};
>+
>+static const char *get_extcap_desc(u32 cap_id)
>+{
>+ switch (cap_id) {
>+ case XHCI_EXT_CAPS_LEGACY:
>+ return "USB Legacy Support";
>+ case XHCI_EXT_CAPS_PROTOCOL:
>+ return "Supported Protocol";
>+ case XHCI_EXT_CAPS_PM:
>+ return "Extended Power Management";
>+ case XHCI_EXT_CAPS_VIRT:
>+ return "I/O Virtualization (xHCI-IOV)";
>+ case XHCI_EXT_CAPS_ROUTE:
>+ return "Message Interrupt";
>+ case XHCI_EXT_CAPS_LOCALMEM:
>+ return "Local Memory";
>+ case XHCI_EXT_CAPS_DEBUG:
>+ return "USB Debug Capability";
as individual files, not one big one that you somehow have to parse in
order to determine this information.