fsi_master_gpio.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #undef TRACE_SYSTEM
  3. #define TRACE_SYSTEM fsi_master_gpio
  4. #if !defined(_TRACE_FSI_MASTER_GPIO_H) || defined(TRACE_HEADER_MULTI_READ)
  5. #define _TRACE_FSI_MASTER_GPIO_H
  6. #include <linux/tracepoint.h>
  7. TRACE_EVENT(fsi_master_gpio_in,
  8. TP_PROTO(const struct fsi_master_gpio *master, int bits, uint64_t msg),
  9. TP_ARGS(master, bits, msg),
  10. TP_STRUCT__entry(
  11. __field(int, master_idx)
  12. __field(int, bits)
  13. __field(uint64_t, msg)
  14. ),
  15. TP_fast_assign(
  16. __entry->master_idx = master->master.idx;
  17. __entry->bits = bits;
  18. __entry->msg = msg & ((1ull<<bits) - 1);
  19. ),
  20. TP_printk("fsi-gpio%d => %0*llx[%d]",
  21. __entry->master_idx,
  22. (__entry->bits + 3) / 4,
  23. __entry->msg,
  24. __entry->bits
  25. )
  26. );
  27. TRACE_EVENT(fsi_master_gpio_out,
  28. TP_PROTO(const struct fsi_master_gpio *master, int bits, uint64_t msg),
  29. TP_ARGS(master, bits, msg),
  30. TP_STRUCT__entry(
  31. __field(int, master_idx)
  32. __field(int, bits)
  33. __field(uint64_t, msg)
  34. ),
  35. TP_fast_assign(
  36. __entry->master_idx = master->master.idx;
  37. __entry->bits = bits;
  38. __entry->msg = msg & ((1ull<<bits) - 1);
  39. ),
  40. TP_printk("fsi-gpio%d <= %0*llx[%d]",
  41. __entry->master_idx,
  42. (__entry->bits + 3) / 4,
  43. __entry->msg,
  44. __entry->bits
  45. )
  46. );
  47. TRACE_EVENT(fsi_master_gpio_clock_zeros,
  48. TP_PROTO(const struct fsi_master_gpio *master, int clocks),
  49. TP_ARGS(master, clocks),
  50. TP_STRUCT__entry(
  51. __field(int, master_idx)
  52. __field(int, clocks)
  53. ),
  54. TP_fast_assign(
  55. __entry->master_idx = master->master.idx;
  56. __entry->clocks = clocks;
  57. ),
  58. TP_printk("fsi-gpio%d clock %d zeros",
  59. __entry->master_idx, __entry->clocks
  60. )
  61. );
  62. TRACE_EVENT(fsi_master_gpio_break,
  63. TP_PROTO(const struct fsi_master_gpio *master),
  64. TP_ARGS(master),
  65. TP_STRUCT__entry(
  66. __field(int, master_idx)
  67. ),
  68. TP_fast_assign(
  69. __entry->master_idx = master->master.idx;
  70. ),
  71. TP_printk("fsi-gpio%d ----break---",
  72. __entry->master_idx
  73. )
  74. );
  75. TRACE_EVENT(fsi_master_gpio_crc_cmd_error,
  76. TP_PROTO(const struct fsi_master_gpio *master),
  77. TP_ARGS(master),
  78. TP_STRUCT__entry(
  79. __field(int, master_idx)
  80. ),
  81. TP_fast_assign(
  82. __entry->master_idx = master->master.idx;
  83. ),
  84. TP_printk("fsi-gpio%d ----CRC command retry---",
  85. __entry->master_idx
  86. )
  87. );
  88. TRACE_EVENT(fsi_master_gpio_crc_rsp_error,
  89. TP_PROTO(const struct fsi_master_gpio *master),
  90. TP_ARGS(master),
  91. TP_STRUCT__entry(
  92. __field(int, master_idx)
  93. ),
  94. TP_fast_assign(
  95. __entry->master_idx = master->master.idx;
  96. ),
  97. TP_printk("fsi-gpio%d ----CRC response---",
  98. __entry->master_idx
  99. )
  100. );
  101. TRACE_EVENT(fsi_master_gpio_poll_response_busy,
  102. TP_PROTO(const struct fsi_master_gpio *master, int busy),
  103. TP_ARGS(master, busy),
  104. TP_STRUCT__entry(
  105. __field(int, master_idx)
  106. __field(int, busy)
  107. ),
  108. TP_fast_assign(
  109. __entry->master_idx = master->master.idx;
  110. __entry->busy = busy;
  111. ),
  112. TP_printk("fsi-gpio%d: device reported busy %d times",
  113. __entry->master_idx, __entry->busy)
  114. );
  115. TRACE_EVENT(fsi_master_gpio_cmd_abs_addr,
  116. TP_PROTO(const struct fsi_master_gpio *master, u32 addr),
  117. TP_ARGS(master, addr),
  118. TP_STRUCT__entry(
  119. __field(int, master_idx)
  120. __field(u32, addr)
  121. ),
  122. TP_fast_assign(
  123. __entry->master_idx = master->master.idx;
  124. __entry->addr = addr;
  125. ),
  126. TP_printk("fsi-gpio%d: Sending ABS_ADR %06x",
  127. __entry->master_idx, __entry->addr)
  128. );
  129. TRACE_EVENT(fsi_master_gpio_cmd_rel_addr,
  130. TP_PROTO(const struct fsi_master_gpio *master, u32 rel_addr),
  131. TP_ARGS(master, rel_addr),
  132. TP_STRUCT__entry(
  133. __field(int, master_idx)
  134. __field(u32, rel_addr)
  135. ),
  136. TP_fast_assign(
  137. __entry->master_idx = master->master.idx;
  138. __entry->rel_addr = rel_addr;
  139. ),
  140. TP_printk("fsi-gpio%d: Sending REL_ADR %03x",
  141. __entry->master_idx, __entry->rel_addr)
  142. );
  143. TRACE_EVENT(fsi_master_gpio_cmd_same_addr,
  144. TP_PROTO(const struct fsi_master_gpio *master),
  145. TP_ARGS(master),
  146. TP_STRUCT__entry(
  147. __field(int, master_idx)
  148. ),
  149. TP_fast_assign(
  150. __entry->master_idx = master->master.idx;
  151. ),
  152. TP_printk("fsi-gpio%d: Sending SAME_ADR",
  153. __entry->master_idx)
  154. );
  155. #endif /* _TRACE_FSI_MASTER_GPIO_H */
  156. #include <trace/define_trace.h>