diff options
author | Uwe Kleine-König <uwe@kleine-koenig.org> | 2019-08-01 16:47:10 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-08-02 07:16:02 -0400 |
commit | 3c0448d507d42605ab6811bcd61c1cd94390d2d8 (patch) | |
tree | f36d5c128243aeba5b057fa797769d6f0ca0bbaa | |
parent | 6b8ac10e0dd4b49eda513c1aa5045b3b1660d350 (diff) |
spi: atmel: 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 <uwe@kleine-koenig.org>
Link: https://lore.kernel.org/r/20190801204710.27309-1-uwe@kleine-koenig.org
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/spi/spi-atmel.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index f00b367523cd..acf318e7330c 100644 --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/gpio/consumer.h> | 23 | #include <linux/gpio/consumer.h> |
24 | #include <linux/pinctrl/consumer.h> | 24 | #include <linux/pinctrl/consumer.h> |
25 | #include <linux/pm_runtime.h> | 25 | #include <linux/pm_runtime.h> |
26 | #include <trace/events/spi.h> | ||
26 | 27 | ||
27 | /* SPI register offsets */ | 28 | /* SPI register offsets */ |
28 | #define SPI_CR 0x0000 | 29 | #define SPI_CR 0x0000 |
@@ -1409,9 +1410,13 @@ static int atmel_spi_transfer_one_message(struct spi_master *master, | |||
1409 | msg->actual_length = 0; | 1410 | msg->actual_length = 0; |
1410 | 1411 | ||
1411 | list_for_each_entry(xfer, &msg->transfers, transfer_list) { | 1412 | list_for_each_entry(xfer, &msg->transfers, transfer_list) { |
1413 | trace_spi_transfer_start(msg, xfer); | ||
1414 | |||
1412 | ret = atmel_spi_one_transfer(master, msg, xfer); | 1415 | ret = atmel_spi_one_transfer(master, msg, xfer); |
1413 | if (ret) | 1416 | if (ret) |
1414 | goto msg_done; | 1417 | goto msg_done; |
1418 | |||
1419 | trace_spi_transfer_stop(msg, xfer); | ||
1415 | } | 1420 | } |
1416 | 1421 | ||
1417 | if (as->use_pdc) | 1422 | if (as->use_pdc) |