drivers/base/regmap/trace.h
Source file repositories/reference/linux-study-clean/drivers/base/regmap/trace.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/base/regmap/trace.h- Extension
.h- Size
- 5382 bytes
- Lines
- 285
- Domain
- Driver Families
- Bucket
- drivers/base
- 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/ktime.hlinux/tracepoint.hinternal.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 regmap
#if !defined(_TRACE_REGMAP_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_REGMAP_H
#include <linux/ktime.h>
#include <linux/tracepoint.h>
#include "internal.h"
/*
* Log register events
*/
DECLARE_EVENT_CLASS(regmap_reg,
TP_PROTO(struct regmap *map, unsigned int reg,
unsigned int val),
TP_ARGS(map, reg, val),
TP_STRUCT__entry(
__string( name, regmap_name(map) )
__field( unsigned int, reg )
__field( unsigned int, val )
),
TP_fast_assign(
__assign_str(name);
__entry->reg = reg;
__entry->val = val;
),
TP_printk("%s reg=%x val=%x", __get_str(name), __entry->reg, __entry->val)
);
DEFINE_EVENT(regmap_reg, regmap_reg_write,
TP_PROTO(struct regmap *map, unsigned int reg,
unsigned int val),
TP_ARGS(map, reg, val)
);
DEFINE_EVENT(regmap_reg, regmap_reg_read,
TP_PROTO(struct regmap *map, unsigned int reg,
unsigned int val),
TP_ARGS(map, reg, val)
);
DEFINE_EVENT(regmap_reg, regmap_reg_read_cache,
TP_PROTO(struct regmap *map, unsigned int reg,
unsigned int val),
TP_ARGS(map, reg, val)
);
DECLARE_EVENT_CLASS(regmap_bulk,
TP_PROTO(struct regmap *map, unsigned int reg,
const void *val, int val_len),
TP_ARGS(map, reg, val, val_len),
TP_STRUCT__entry(
__string(name, regmap_name(map))
__field(unsigned int, reg)
__dynamic_array(char, buf, val_len)
__field(int, val_len)
),
TP_fast_assign(
__assign_str(name);
__entry->reg = reg;
__entry->val_len = val_len;
memcpy(__get_dynamic_array(buf), val, val_len);
),
TP_printk("%s reg=%x val=%s", __get_str(name), __entry->reg,
__print_hex(__get_dynamic_array(buf), __entry->val_len))
);
DEFINE_EVENT(regmap_bulk, regmap_bulk_write,
TP_PROTO(struct regmap *map, unsigned int reg,
const void *val, int val_len),
Annotation
- Immediate include surface: `linux/ktime.h`, `linux/tracepoint.h`, `internal.h`, `trace/define_trace.h`.
- Atlas domain: Driver Families / drivers/base.
- 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.