spi: Enable tracing of the SPI setup CS selection
PATCH 1/1 spi: Enable tracing of the SPI setup CS selection
It is helpful to see what state of CS signal was during one or another SPI operation. All the same for SPI setup.
Enable tracing of the SPI setup and CS selection.
Signed-off-by Andy Shevchenko <[email protected]>
--- drivers/spi/spi.c | 4 +++ include/trace/events/spi.h | 57 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+)
drivers/spi/spi.c +4 -0
@@ -804,6 +804,8 @@ static void spi_set_cs(struct spi_device *spi, bool enable, bool force) (spi->controller->last_cs_mode_high == (spi->mode & SPI_CS_HIGH))) return; +trace_spi_set_cs (spi, activate); + spi->controller->last_cs_enable = enable; spi->controller->last_cs_mode_high = spi->mode &SPI_CS_HIGH ;
@@ -3457,6 +3459,8 @@ int spi_setup(struct spi_device *spi)spi_set_thread_rt (spi->controller); } +trace_spi_setup (spi, status); + dev_dbg(&spi->dev, "setup mode %lu, %s%s%s%s%u bits/w, %u Hz max --> %d\n", spi->mode & SPI_MODE_X_MASK, (spi->mode & SPI_CS_HIGH) ? "cs_high, " : "",
include/trace/events/spi.h +57 -0
63 lines not on this page · raw message
Signature · 1 line
2.30.2
From: Mark Brown,,, <[email protected]>
Quoted 4 lines · Andy Shevchenko
It is helpful to see what state of CS signal was during one or another SPI operation. All the same for SPI setup.
Enable tracing of the SPI setup and CS selection.
Applied, thanks!
[1/1] spi: Enable tracing of the SPI setup CS selection
commit: 5cb4e1f33e5eeadbce3814282e010d4dd31816af
Best regards,
Signature · 1 line
Mark Brown,,, <[email protected]>