~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/trace/events/spi.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/trace/events/spi.h (Version linux-6.11.5) and /include/trace/events/spi.h (Version linux-5.10.223)


** Warning: Cannot open xref database.

  1 /* SPDX-License-Identifier: GPL-2.0 */              1 
  2 #undef TRACE_SYSTEM                               
  3 #define TRACE_SYSTEM spi                          
  4                                                   
  5 #if !defined(_TRACE_SPI_H) || defined(TRACE_HE    
  6 #define _TRACE_SPI_H                              
  7                                                   
  8 #include <linux/ktime.h>                          
  9 #include <linux/tracepoint.h>                     
 10                                                   
 11 DECLARE_EVENT_CLASS(spi_controller,               
 12                                                   
 13         TP_PROTO(struct spi_controller *contro    
 14                                                   
 15         TP_ARGS(controller),                      
 16                                                   
 17         TP_STRUCT__entry(                         
 18                 __field(        int,              
 19         ),                                        
 20                                                   
 21         TP_fast_assign(                           
 22                 __entry->bus_num = controller-    
 23         ),                                        
 24                                                   
 25         TP_printk("spi%d", (int)__entry->bus_n    
 26                                                   
 27 );                                                
 28                                                   
 29 DEFINE_EVENT(spi_controller, spi_controller_id    
 30                                                   
 31         TP_PROTO(struct spi_controller *contro    
 32                                                   
 33         TP_ARGS(controller)                       
 34                                                   
 35 );                                                
 36                                                   
 37 DEFINE_EVENT(spi_controller, spi_controller_bu    
 38                                                   
 39         TP_PROTO(struct spi_controller *contro    
 40                                                   
 41         TP_ARGS(controller)                       
 42                                                   
 43 );                                                
 44                                                   
 45 TRACE_EVENT(spi_setup,                            
 46         TP_PROTO(struct spi_device *spi, int s    
 47         TP_ARGS(spi, status),                     
 48                                                   
 49         TP_STRUCT__entry(                         
 50                 __field(int, bus_num)             
 51                 __field(int, chip_select)         
 52                 __field(unsigned long, mode)      
 53                 __field(unsigned int, bits_per    
 54                 __field(unsigned int, max_spee    
 55                 __field(int, status)              
 56         ),                                        
 57                                                   
 58         TP_fast_assign(                           
 59                 __entry->bus_num = spi->contro    
 60                 __entry->chip_select =  spi_ge    
 61                 __entry->mode = spi->mode;        
 62                 __entry->bits_per_word = spi->    
 63                 __entry->max_speed_hz = spi->m    
 64                 __entry->status = status;         
 65         ),                                        
 66                                                   
 67         TP_printk("spi%d.%d setup mode %lu, %s    
 68                   __entry->bus_num, __entry->c    
 69                   (__entry->mode & SPI_MODE_X_    
 70                   (__entry->mode & SPI_CS_HIGH    
 71                   (__entry->mode & SPI_LSB_FIR    
 72                   (__entry->mode & SPI_3WIRE)     
 73                   (__entry->mode & SPI_LOOP) ?    
 74                   __entry->bits_per_word, __en    
 75                   __entry->status)                
 76 );                                                
 77                                                   
 78 TRACE_EVENT(spi_set_cs,                           
 79         TP_PROTO(struct spi_device *spi, bool     
 80         TP_ARGS(spi, enable),                     
 81                                                   
 82         TP_STRUCT__entry(                         
 83                 __field(int, bus_num)             
 84                 __field(int, chip_select)         
 85                 __field(unsigned long, mode)      
 86                 __field(bool, enable)             
 87         ),                                        
 88                                                   
 89         TP_fast_assign(                           
 90                 __entry->bus_num = spi->contro    
 91                 __entry->chip_select = spi_get    
 92                 __entry->mode = spi->mode;        
 93                 __entry->enable = enable;         
 94         ),                                        
 95                                                   
 96         TP_printk("spi%d.%d %s%s",                
 97                   __entry->bus_num, __entry->c    
 98                   __entry->enable ? "activate"    
 99                   (__entry->mode & SPI_CS_HIGH    
100 );                                                
101                                                   
102 DECLARE_EVENT_CLASS(spi_message,                  
103                                                   
104         TP_PROTO(struct spi_message *msg),        
105                                                   
106         TP_ARGS(msg),                             
107                                                   
108         TP_STRUCT__entry(                         
109                 __field(        int,              
110                 __field(        int,              
111                 __field(        struct spi_mes    
112         ),                                        
113                                                   
114         TP_fast_assign(                           
115                 __entry->bus_num = msg->spi->c    
116                 __entry->chip_select = spi_get    
117                 __entry->msg = msg;               
118         ),                                        
119                                                   
120         TP_printk("spi%d.%d %p", (int)__entry-    
121                   (int)__entry->chip_select,      
122                   (struct spi_message *)__entr    
123 );                                                
124                                                   
125 DEFINE_EVENT(spi_message, spi_message_submit,     
126                                                   
127         TP_PROTO(struct spi_message *msg),        
128                                                   
129         TP_ARGS(msg)                              
130                                                   
131 );                                                
132                                                   
133 DEFINE_EVENT(spi_message, spi_message_start,      
134                                                   
135         TP_PROTO(struct spi_message *msg),        
136                                                   
137         TP_ARGS(msg)                              
138                                                   
139 );                                                
140                                                   
141 TRACE_EVENT(spi_message_done,                     
142                                                   
143         TP_PROTO(struct spi_message *msg),        
144                                                   
145         TP_ARGS(msg),                             
146                                                   
147         TP_STRUCT__entry(                         
148                 __field(        int,              
149                 __field(        int,              
150                 __field(        struct spi_mes    
151                 __field(        unsigned,         
152                 __field(        unsigned,         
153         ),                                        
154                                                   
155         TP_fast_assign(                           
156                 __entry->bus_num = msg->spi->c    
157                 __entry->chip_select = spi_get    
158                 __entry->msg = msg;               
159                 __entry->frame = msg->frame_le    
160                 __entry->actual = msg->actual_    
161         ),                                        
162                                                   
163         TP_printk("spi%d.%d %p len=%u/%u", (in    
164                   (int)__entry->chip_select,      
165                   (struct spi_message *)__entr    
166                   (unsigned)__entry->actual, (    
167 );                                                
168                                                   
169 /*                                                
170  * Consider a buffer valid if non-NULL and if     
171  * that only exist to work with controllers th    
172  * SPI_CONTROLLER_MUST_RX.                        
173  */                                               
174 #define spi_valid_txbuf(msg, xfer) \              
175         (xfer->tx_buf && xfer->tx_buf != msg->    
176 #define spi_valid_rxbuf(msg, xfer) \              
177         (xfer->rx_buf && xfer->rx_buf != msg->    
178                                                   
179 DECLARE_EVENT_CLASS(spi_transfer,                 
180                                                   
181         TP_PROTO(struct spi_message *msg, stru    
182                                                   
183         TP_ARGS(msg, xfer),                       
184                                                   
185         TP_STRUCT__entry(                         
186                 __field(        int,              
187                 __field(        int,              
188                 __field(        struct spi_tra    
189                 __field(        int,              
190                 __dynamic_array(u8, rx_buf,       
191                                 spi_valid_rxbu    
192                                         (xfer-    
193                 __dynamic_array(u8, tx_buf,       
194                                 spi_valid_txbu    
195                                         (xfer-    
196         ),                                        
197                                                   
198         TP_fast_assign(                           
199                 __entry->bus_num = msg->spi->c    
200                 __entry->chip_select = spi_get    
201                 __entry->xfer = xfer;             
202                 __entry->len = xfer->len;         
203                                                   
204                 if (spi_valid_txbuf(msg, xfer)    
205                         memcpy(__get_dynamic_a    
206                                xfer->tx_buf, _    
207                                                   
208                 if (spi_valid_rxbuf(msg, xfer)    
209                         memcpy(__get_dynamic_a    
210                                xfer->rx_buf, _    
211         ),                                        
212                                                   
213         TP_printk("spi%d.%d %p len=%d tx=[%*ph    
214                   __entry->bus_num, __entry->c    
215                   __entry->xfer, __entry->len,    
216                   __get_dynamic_array_len(tx_b    
217                   __get_dynamic_array_len(rx_b    
218 );                                                
219                                                   
220 DEFINE_EVENT(spi_transfer, spi_transfer_start,    
221                                                   
222         TP_PROTO(struct spi_message *msg, stru    
223                                                   
224         TP_ARGS(msg, xfer)                        
225                                                   
226 );                                                
227                                                   
228 DEFINE_EVENT(spi_transfer, spi_transfer_stop,     
229                                                   
230         TP_PROTO(struct spi_message *msg, stru    
231                                                   
232         TP_ARGS(msg, xfer)                        
233                                                   
234 );                                                
235                                                   
236 #endif /* _TRACE_POWER_H */                       
237                                                   
238 /* This part must be outside protection */        
239 #include <trace/define_trace.h>                   
240                                                   

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php