met_ftrace_touch.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (C) 2019 MediaTek Inc.
  4. */
  5. #undef TRACE_SYSTEM
  6. #define TRACE_SYSTEM met_touch
  7. #if !defined(__TRACE_MET_FTRACE_TOUCH_H__) || defined(TRACE_HEADER_MULTI_READ)
  8. #define __TRACE_MET_FTRACE_TOUCH_H__
  9. #include <linux/tracepoint.h>
  10. /*
  11. * Tracepoint for MET_touch
  12. */
  13. TRACE_EVENT(MET_touch,
  14. TP_PROTO(char *touch_type, long tsec, long tusec,
  15. char *mode, int value),
  16. TP_ARGS(touch_type, tsec, tusec, mode, value),
  17. TP_STRUCT__entry(
  18. __array(char, _touch_type, 16)
  19. __field(long, _tsec)
  20. __field(long, _tusec)
  21. __array(char, _mode, 16)
  22. __field(int, _value)
  23. ),
  24. TP_fast_assign(
  25. memcpy(__entry->_touch_type, touch_type, 16);
  26. __entry->_tsec = tsec;
  27. __entry->_tusec = tusec;
  28. memcpy(__entry->_mode, mode, 16);
  29. __entry->_value = value;
  30. ),
  31. TP_printk("%s,%ld.%06ld,%s,%x",
  32. __entry->_touch_type,
  33. __entry->_tsec,
  34. __entry->_tusec,
  35. __entry->_mode,
  36. __entry->_value
  37. )
  38. );
  39. #endif /* __TRACE_MET_FTRACE_TOUCH_H__ */
  40. /* This part must be outside protection */
  41. #undef TRACE_INCLUDE_PATH
  42. #undef linux
  43. #define TRACE_INCLUDE_PATH .
  44. #define TRACE_INCLUDE_FILE met_ftrace_touch
  45. #include <trace/define_trace.h>