diff options
Diffstat (limited to 'include/trace')
| -rw-r--r-- | include/trace/events/spi.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/include/trace/events/spi.h b/include/trace/events/spi.h index a7b09072ce56..5e77e21f885a 100644 --- a/include/trace/events/spi.h +++ b/include/trace/events/spi.h | |||
| @@ -80,12 +80,32 @@ DEFINE_EVENT(spi_message, spi_message_start, | |||
| 80 | 80 | ||
| 81 | ); | 81 | ); |
| 82 | 82 | ||
| 83 | DEFINE_EVENT(spi_message, spi_message_done, | 83 | TRACE_EVENT(spi_message_done, |
| 84 | 84 | ||
| 85 | TP_PROTO(struct spi_message *msg), | 85 | TP_PROTO(struct spi_message *msg), |
| 86 | 86 | ||
| 87 | TP_ARGS(msg) | 87 | TP_ARGS(msg), |
| 88 | |||
| 89 | TP_STRUCT__entry( | ||
| 90 | __field( int, bus_num ) | ||
| 91 | __field( int, chip_select ) | ||
| 92 | __field( struct spi_message *, msg ) | ||
| 93 | __field( unsigned, frame ) | ||
| 94 | __field( unsigned, actual ) | ||
| 95 | ), | ||
| 88 | 96 | ||
| 97 | TP_fast_assign( | ||
| 98 | __entry->bus_num = msg->spi->master->bus_num; | ||
| 99 | __entry->chip_select = msg->spi->chip_select; | ||
| 100 | __entry->msg = msg; | ||
| 101 | __entry->frame = msg->frame_length; | ||
| 102 | __entry->actual = msg->actual_length; | ||
| 103 | ), | ||
| 104 | |||
| 105 | TP_printk("spi%d.%d %p len=%u/%u", (int)__entry->bus_num, | ||
| 106 | (int)__entry->chip_select, | ||
| 107 | (struct spi_message *)__entry->msg, | ||
| 108 | (unsigned)__entry->actual, (unsigned)__entry->frame) | ||
| 89 | ); | 109 | ); |
| 90 | 110 | ||
| 91 | #endif /* _TRACE_POWER_H */ | 111 | #endif /* _TRACE_POWER_H */ |
