diff options
| author | Sean Anderson <sean.anderson@linux.dev> | 2025-10-21 10:47:03 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2025-10-27 11:10:50 +0000 |
| commit | 77a58ba7c64ccca20616aa03599766ccb0d1a330 (patch) | |
| tree | b106ed70cc065132b0176fa3ea321d40738e2395 /drivers/spi | |
| parent | fd5ef3d69f8975bad16c437a337b5cb04c8217a2 (diff) | |
spi: spi-mem: Trace exec_op
The spi subsystem has tracing, which is very convenient when debugging
problems. Add tracing for spi-mem too so that accesses that skip the spi
subsystem can still be seen.
The format is roughly based on the existing spi tracing. We don't bother
tracing the op's address because the tracing happens while the memory is
locked, so there can be no confusion about the matching of start and
stop. The conversion of cmd/addr/dummy to an array is directly analogous
to the conversion in the latter half of spi_mem_exec_op.
Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
Link: https://patch.msgid.link/20251021144702.1582397-1-sean.anderson@linux.dev
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
| -rw-r--r-- | drivers/spi/spi-mem.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/spi/spi-mem.c b/drivers/spi/spi-mem.c index 064b99204d9a..c8b2add2640e 100644 --- a/drivers/spi/spi-mem.c +++ b/drivers/spi/spi-mem.c @@ -12,6 +12,9 @@ #include <linux/spi/spi-mem.h> #include <linux/sched/task_stack.h> +#define CREATE_TRACE_POINTS +#include <trace/events/spi-mem.h> + #include "internals.h" #define SPI_MEM_MAX_BUSWIDTH 8 @@ -403,7 +406,9 @@ int spi_mem_exec_op(struct spi_mem *mem, const struct spi_mem_op *op) if (ret) return ret; + trace_spi_mem_start_op(mem, op); ret = ctlr->mem_ops->exec_op(mem, op); + trace_spi_mem_stop_op(mem, op); spi_mem_access_end(mem); |
