drivers/usb/musb/musb_trace.h
Source file repositories/reference/linux-study-clean/drivers/usb/musb/musb_trace.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/musb/musb_trace.h- Extension
.h- Size
- 9485 bytes
- Lines
- 390
- 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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/tracepoint.hlinux/usb.hmusb_core.hcppi_dma.htrace/define_trace.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#undef TRACE_SYSTEM
#define TRACE_SYSTEM musb
#if !defined(__MUSB_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
#define __MUSB_TRACE_H
#include <linux/types.h>
#include <linux/tracepoint.h>
#include <linux/usb.h>
#include "musb_core.h"
#ifdef CONFIG_USB_TI_CPPI41_DMA
#include "cppi_dma.h"
#endif
#define MUSB_MSG_MAX 500
TRACE_EVENT(musb_log,
TP_PROTO(struct musb *musb, struct va_format *vaf),
TP_ARGS(musb, vaf),
TP_STRUCT__entry(
__string(name, dev_name(musb->controller))
__vstring(msg, vaf->fmt, vaf->va)
),
TP_fast_assign(
__assign_str(name);
__assign_vstr(msg, vaf->fmt, vaf->va);
),
TP_printk("%s: %s", __get_str(name), __get_str(msg))
);
TRACE_EVENT(musb_state,
TP_PROTO(struct musb *musb, u8 devctl, const char *desc),
TP_ARGS(musb, devctl, desc),
TP_STRUCT__entry(
__string(name, dev_name(musb->controller))
__field(u8, devctl)
__string(desc, desc)
),
TP_fast_assign(
__assign_str(name);
__entry->devctl = devctl;
__assign_str(desc);
),
TP_printk("%s: devctl: %02x %s", __get_str(name), __entry->devctl,
__get_str(desc))
);
DECLARE_EVENT_CLASS(musb_regb,
TP_PROTO(void *caller, const void __iomem *addr,
unsigned int offset, u8 data),
TP_ARGS(caller, addr, offset, data),
TP_STRUCT__entry(
__field(void *, caller)
__field(const void __iomem *, addr)
__field(unsigned int, offset)
__field(u8, data)
),
TP_fast_assign(
__entry->caller = caller;
__entry->addr = addr;
__entry->offset = offset;
__entry->data = data;
),
TP_printk("%pS: %p + %04x: %02x",
__entry->caller, __entry->addr, __entry->offset, __entry->data)
);
DEFINE_EVENT(musb_regb, musb_readb,
TP_PROTO(void *caller, const void __iomem *addr,
unsigned int offset, u8 data),
TP_ARGS(caller, addr, offset, data)
);
DEFINE_EVENT(musb_regb, musb_writeb,
TP_PROTO(void *caller, const void __iomem *addr,
unsigned int offset, u8 data),
TP_ARGS(caller, addr, offset, data)
);
DECLARE_EVENT_CLASS(musb_regw,
TP_PROTO(void *caller, const void __iomem *addr,
unsigned int offset, u16 data),
TP_ARGS(caller, addr, offset, data),
TP_STRUCT__entry(
__field(void *, caller)
__field(const void __iomem *, addr)
__field(unsigned int, offset)
__field(u16, data)
),
TP_fast_assign(
Annotation
- Immediate include surface: `linux/types.h`, `linux/tracepoint.h`, `linux/usb.h`, `musb_core.h`, `cppi_dma.h`, `trace/define_trace.h`.
- Atlas domain: Driver Families / drivers/usb.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.