drivers/iio/common/cros_ec_sensors/cros_ec_sensors_trace.h
Source file repositories/reference/linux-study-clean/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_trace.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/iio/common/cros_ec_sensors/cros_ec_sensors_trace.h- Extension
.h- Size
- 1604 bytes
- Lines
- 57
- Domain
- Driver Families
- Bucket
- drivers/iio
- 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/bits.hlinux/types.hlinux/platform_data/cros_ec_commands.hlinux/platform_data/cros_ec_proto.hlinux/tracepoint.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 cros_ec
#if !defined(_CROS_EC_SENSORS_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ)
#define _CROS_EC_SENSORS_TRACE_H_
#include <linux/bits.h>
#include <linux/types.h>
#include <linux/platform_data/cros_ec_commands.h>
#include <linux/platform_data/cros_ec_proto.h>
#include <linux/tracepoint.h>
TRACE_EVENT(cros_ec_motion_host_cmd,
TP_PROTO(struct ec_params_motion_sense *param,
struct ec_response_motion_sense *resp,
int retval),
TP_ARGS(param, resp, retval),
TP_STRUCT__entry(__field(uint8_t, cmd)
__field(uint8_t, sensor_id)
__field(uint32_t, data)
__field(int, retval)
__field(int32_t, ret)
),
TP_fast_assign(__entry->cmd = param->cmd;
__entry->sensor_id = param->sensor_odr.sensor_num;
__entry->data = param->sensor_odr.data;
__entry->retval = retval;
__entry->ret = retval > 0 ? resp->sensor_odr.ret : -1;
),
TP_printk("%s, id: %d, data: %u, result: %u, return: %d",
__print_symbolic(__entry->cmd, MOTIONSENSE_CMDS),
__entry->sensor_id,
__entry->data,
__entry->retval,
__entry->ret)
);
#endif /* _CROS_EC_SENSORS_TRACE_H_ */
/* this part must be outside header guard */
#undef TRACE_INCLUDE_PATH
#define TRACE_INCLUDE_PATH ../../drivers/iio/common/cros_ec_sensors
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_FILE cros_ec_sensors_trace
#include <trace/define_trace.h>
Annotation
- Immediate include surface: `linux/bits.h`, `linux/types.h`, `linux/platform_data/cros_ec_commands.h`, `linux/platform_data/cros_ec_proto.h`, `linux/tracepoint.h`, `trace/define_trace.h`.
- Atlas domain: Driver Families / drivers/iio.
- 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.