summaryrefslogtreecommitdiff
path: root/include/trace
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2017-06-13 14:23:52 +0300
committerMark Brown <broonie@kernel.org>2017-06-13 20:51:11 +0300
commit8caab75fd2c2a92667cbb1cd315720bede3feaa9 (patch)
tree8252d9a84e32698fe52f12dd6e94227555857668 /include/trace
parentc94085f587a77495eabb78a959bd591bee4ec89b (diff)
downloadlinux-8caab75fd2c2a92667cbb1cd315720bede3feaa9.tar.xz
spi: Generalize SPI "master" to "controller"
Now struct spi_master is used for both SPI master and slave controllers, it makes sense to rename it to struct spi_controller, and replace "master" by "controller" where appropriate. For now this conversion is done for SPI core infrastructure only. Wrappers are provided for backwards compatibility, until all SPI drivers have been converted. Noteworthy details: - SPI_MASTER_GPIO_SS is retained, as it only makes sense for SPI master controllers, - spi_busnum_to_master() is retained, as it looks up masters only, - A new field spi_device.controller is added, but spi_device.master is retained for compatibility (both are always initialized by spi_alloc_device()), - spi_flash_read() is used by SPI masters only. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/spi.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/include/trace/events/spi.h b/include/trace/events/spi.h
index 7e02c983bbe2..f9f702b6ae2e 100644
--- a/include/trace/events/spi.h
+++ b/include/trace/events/spi.h
@@ -7,37 +7,37 @@
#include <linux/ktime.h>
#include <linux/tracepoint.h>
-DECLARE_EVENT_CLASS(spi_master,
+DECLARE_EVENT_CLASS(spi_controller,
- TP_PROTO(struct spi_master *master),
+ TP_PROTO(struct spi_controller *controller),
- TP_ARGS(master),
+ TP_ARGS(controller),
TP_STRUCT__entry(
__field( int, bus_num )
),
TP_fast_assign(
- __entry->bus_num = master->bus_num;
+ __entry->bus_num = controller->bus_num;
),
TP_printk("spi%d", (int)__entry->bus_num)
);
-DEFINE_EVENT(spi_master, spi_master_idle,
+DEFINE_EVENT(spi_controller, spi_controller_idle,
- TP_PROTO(struct spi_master *master),
+ TP_PROTO(struct spi_controller *controller),
- TP_ARGS(master)
+ TP_ARGS(controller)
);
-DEFINE_EVENT(spi_master, spi_master_busy,
+DEFINE_EVENT(spi_controller, spi_controller_busy,
- TP_PROTO(struct spi_master *master),
+ TP_PROTO(struct spi_controller *controller),
- TP_ARGS(master)
+ TP_ARGS(controller)
);
@@ -54,7 +54,7 @@ DECLARE_EVENT_CLASS(spi_message,
),
TP_fast_assign(
- __entry->bus_num = msg->spi->master->bus_num;
+ __entry->bus_num = msg->spi->controller->bus_num;
__entry->chip_select = msg->spi->chip_select;
__entry->msg = msg;
),
@@ -95,7 +95,7 @@ TRACE_EVENT(spi_message_done,
),
TP_fast_assign(
- __entry->bus_num = msg->spi->master->bus_num;
+ __entry->bus_num = msg->spi->controller->bus_num;
__entry->chip_select = msg->spi->chip_select;
__entry->msg = msg;
__entry->frame = msg->frame_length;
@@ -122,7 +122,7 @@ DECLARE_EVENT_CLASS(spi_transfer,
),
TP_fast_assign(
- __entry->bus_num = msg->spi->master->bus_num;
+ __entry->bus_num = msg->spi->controller->bus_num;
__entry->chip_select = msg->spi->chip_select;
__entry->xfer = xfer;
__entry->len = xfer->len;