mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 05:34:13 +08:00
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>
This commit is contained in:
parent
6b8ac10e0d
commit
3c0448d507
@ -23,6 +23,7 @@
|
|||||||
#include <linux/gpio/consumer.h>
|
#include <linux/gpio/consumer.h>
|
||||||
#include <linux/pinctrl/consumer.h>
|
#include <linux/pinctrl/consumer.h>
|
||||||
#include <linux/pm_runtime.h>
|
#include <linux/pm_runtime.h>
|
||||||
|
#include <trace/events/spi.h>
|
||||||
|
|
||||||
/* SPI register offsets */
|
/* SPI register offsets */
|
||||||
#define SPI_CR 0x0000
|
#define SPI_CR 0x0000
|
||||||
@ -1409,9 +1410,13 @@ static int atmel_spi_transfer_one_message(struct spi_master *master,
|
|||||||
msg->actual_length = 0;
|
msg->actual_length = 0;
|
||||||
|
|
||||||
list_for_each_entry(xfer, &msg->transfers, transfer_list) {
|
list_for_each_entry(xfer, &msg->transfers, transfer_list) {
|
||||||
|
trace_spi_transfer_start(msg, xfer);
|
||||||
|
|
||||||
ret = atmel_spi_one_transfer(master, msg, xfer);
|
ret = atmel_spi_one_transfer(master, msg, xfer);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto msg_done;
|
goto msg_done;
|
||||||
|
|
||||||
|
trace_spi_transfer_stop(msg, xfer);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (as->use_pdc)
|
if (as->use_pdc)
|
||||||
|
Loading…
Reference in New Issue
Block a user