drivers/usb/host/xhci-debugfs.h

Source file repositories/reference/linux-study-clean/drivers/usb/host/xhci-debugfs.h

File Facts

System
Linux kernel
Corpus path
drivers/usb/host/xhci-debugfs.h
Extension
.h
Size
4297 bytes
Lines
144
Domain
Driver Families
Bucket
drivers/usb
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct xhci_regset {
	char			name[DEBUGFS_NAMELEN];
	struct debugfs_regset32	regset;
	size_t			nregs;
	struct list_head	list;
};

struct xhci_file_map {
	const char		*name;
	int			(*show)(struct seq_file *s, void *unused);
};

struct xhci_ep_priv {
	char			name[DEBUGFS_NAMELEN];
	struct dentry		*root;
	struct xhci_stream_info *stream_info;
	struct xhci_ring	*show_ring;
	unsigned int		stream_id;
};

struct xhci_slot_priv {
	char			name[DEBUGFS_NAMELEN];
	struct dentry		*root;
	struct xhci_ep_priv	*eps[31];
	struct xhci_virt_device	*dev;
};

#ifdef CONFIG_DEBUG_FS
void xhci_debugfs_init(struct xhci_hcd *xhci);
void xhci_debugfs_exit(struct xhci_hcd *xhci);
void __init xhci_debugfs_create_root(void);
void __exit xhci_debugfs_remove_root(void);
void xhci_debugfs_create_slot(struct xhci_hcd *xhci, int slot_id);
void xhci_debugfs_remove_slot(struct xhci_hcd *xhci, int slot_id);
void xhci_debugfs_create_endpoint(struct xhci_hcd *xhci,
				  struct xhci_virt_device *virt_dev,
				  int ep_index);
void xhci_debugfs_remove_endpoint(struct xhci_hcd *xhci,
				  struct xhci_virt_device *virt_dev,
				  int ep_index);
void xhci_debugfs_create_stream_files(struct xhci_hcd *xhci,
				      struct xhci_virt_device *virt_dev,
				      int ep_index);
#else
static inline void xhci_debugfs_init(struct xhci_hcd *xhci) { }
static inline void xhci_debugfs_exit(struct xhci_hcd *xhci) { }
static inline void __init xhci_debugfs_create_root(void) { }
static inline void __exit xhci_debugfs_remove_root(void) { }
static inline void xhci_debugfs_create_slot(struct xhci_hcd *x, int s) { }
static inline void xhci_debugfs_remove_slot(struct xhci_hcd *x, int s) { }
static inline void
xhci_debugfs_create_endpoint(struct xhci_hcd *xhci,
			     struct xhci_virt_device *virt_dev,
			     int ep_index) { }
static inline void
xhci_debugfs_remove_endpoint(struct xhci_hcd *xhci,
			     struct xhci_virt_device *virt_dev,
			     int ep_index) { }
static inline void
xhci_debugfs_create_stream_files(struct xhci_hcd *xhci,
				 struct xhci_virt_device *virt_dev,
				 int ep_index) { }
#endif /* CONFIG_DEBUG_FS */

#endif /* __LINUX_XHCI_DEBUGFS_H */

Annotation

Implementation Notes