diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2019-01-29 08:48:17 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-01-29 10:08:58 -0500 |
commit | f3fdea3af405f3269099a695d670675cddcd0bfc (patch) | |
tree | b1eb5dee4ffee2d947b076283093825e9aaf0db6 | |
parent | c55d0e8c543bfd21f0dce73024e5f6a9a306b834 (diff) |
spi: mxs: add tracing to custom .transfer_one_message callback
Driver specific implementations for .transfer_one_message need to call
the tracing stuff themself. This is necessary to make spi tracing
actually useful.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/spi/spi-mxs.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c index 6ac95a2a21ce..7bf53cfc25d6 100644 --- a/drivers/spi/spi-mxs.c +++ b/drivers/spi/spi-mxs.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/stmp_device.h> | 39 | #include <linux/stmp_device.h> |
40 | #include <linux/spi/spi.h> | 40 | #include <linux/spi/spi.h> |
41 | #include <linux/spi/mxs-spi.h> | 41 | #include <linux/spi/mxs-spi.h> |
42 | #include <trace/events/spi.h> | ||
42 | 43 | ||
43 | #define DRIVER_NAME "mxs-spi" | 44 | #define DRIVER_NAME "mxs-spi" |
44 | 45 | ||
@@ -374,6 +375,8 @@ static int mxs_spi_transfer_one(struct spi_master *master, | |||
374 | 375 | ||
375 | list_for_each_entry(t, &m->transfers, transfer_list) { | 376 | list_for_each_entry(t, &m->transfers, transfer_list) { |
376 | 377 | ||
378 | trace_spi_transfer_start(m, t); | ||
379 | |||
377 | status = mxs_spi_setup_transfer(m->spi, t); | 380 | status = mxs_spi_setup_transfer(m->spi, t); |
378 | if (status) | 381 | if (status) |
379 | break; | 382 | break; |
@@ -419,6 +422,8 @@ static int mxs_spi_transfer_one(struct spi_master *master, | |||
419 | flag); | 422 | flag); |
420 | } | 423 | } |
421 | 424 | ||
425 | trace_spi_transfer_stop(m, t); | ||
426 | |||
422 | if (status) { | 427 | if (status) { |
423 | stmp_reset_block(ssp->base); | 428 | stmp_reset_block(ssp->base); |
424 | break; | 429 | break; |