1 // SPDX-License-Identifier: GPL-2.0
2 // Trace events for the ChromeOS Embedded Controller
3 //
4 // Copyright 2019 Google LLC.
5 
6 #define TRACE_SYMBOL(a) {a, #a}
7 
8 // Generate the list using the following script:
9 // sed -n 's/^#define \(EC_CMD_[[:alnum:]_]*\)\s.*/\tTRACE_SYMBOL(\1), \\/p' include/linux/platform_data/cros_ec_commands.h
10 #define EC_CMDS \
11 	TRACE_SYMBOL(EC_CMD_PROTO_VERSION), \
12 	TRACE_SYMBOL(EC_CMD_HELLO), \
13 	TRACE_SYMBOL(EC_CMD_GET_VERSION), \
14 	TRACE_SYMBOL(EC_CMD_READ_TEST), \
15 	TRACE_SYMBOL(EC_CMD_GET_BUILD_INFO), \
16 	TRACE_SYMBOL(EC_CMD_GET_CHIP_INFO), \
17 	TRACE_SYMBOL(EC_CMD_GET_BOARD_VERSION), \
18 	TRACE_SYMBOL(EC_CMD_READ_MEMMAP), \
19 	TRACE_SYMBOL(EC_CMD_GET_CMD_VERSIONS), \
20 	TRACE_SYMBOL(EC_CMD_GET_COMMS_STATUS), \
21 	TRACE_SYMBOL(EC_CMD_TEST_PROTOCOL), \
22 	TRACE_SYMBOL(EC_CMD_GET_PROTOCOL_INFO), \
23 	TRACE_SYMBOL(EC_CMD_GSV_PAUSE_IN_S5), \
24 	TRACE_SYMBOL(EC_CMD_GET_FEATURES), \
25 	TRACE_SYMBOL(EC_CMD_FLASH_INFO), \
26 	TRACE_SYMBOL(EC_CMD_FLASH_READ), \
27 	TRACE_SYMBOL(EC_CMD_FLASH_WRITE), \
28 	TRACE_SYMBOL(EC_CMD_FLASH_ERASE), \
29 	TRACE_SYMBOL(EC_CMD_FLASH_PROTECT), \
30 	TRACE_SYMBOL(EC_CMD_FLASH_REGION_INFO), \
31 	TRACE_SYMBOL(EC_CMD_VBNV_CONTEXT), \
32 	TRACE_SYMBOL(EC_CMD_PWM_GET_FAN_TARGET_RPM), \
33 	TRACE_SYMBOL(EC_CMD_PWM_SET_FAN_TARGET_RPM), \
34 	TRACE_SYMBOL(EC_CMD_PWM_GET_KEYBOARD_BACKLIGHT), \
35 	TRACE_SYMBOL(EC_CMD_PWM_SET_KEYBOARD_BACKLIGHT), \
36 	TRACE_SYMBOL(EC_CMD_PWM_SET_FAN_DUTY), \
37 	TRACE_SYMBOL(EC_CMD_PWM_SET_DUTY), \
38 	TRACE_SYMBOL(EC_CMD_PWM_GET_DUTY), \
39 	TRACE_SYMBOL(EC_CMD_LIGHTBAR_CMD), \
40 	TRACE_SYMBOL(EC_CMD_LED_CONTROL), \
41 	TRACE_SYMBOL(EC_CMD_VBOOT_HASH), \
42 	TRACE_SYMBOL(EC_CMD_MOTION_SENSE_CMD), \
43 	TRACE_SYMBOL(EC_CMD_USB_CHARGE_SET_MODE), \
44 	TRACE_SYMBOL(EC_CMD_PSTORE_INFO), \
45 	TRACE_SYMBOL(EC_CMD_PSTORE_READ), \
46 	TRACE_SYMBOL(EC_CMD_PSTORE_WRITE), \
47 	TRACE_SYMBOL(EC_CMD_RTC_GET_VALUE), \
48 	TRACE_SYMBOL(EC_CMD_RTC_GET_ALARM), \
49 	TRACE_SYMBOL(EC_CMD_RTC_SET_VALUE), \
50 	TRACE_SYMBOL(EC_CMD_RTC_SET_ALARM), \
51 	TRACE_SYMBOL(EC_CMD_PORT80_LAST_BOOT), \
52 	TRACE_SYMBOL(EC_CMD_PORT80_READ), \
53 	TRACE_SYMBOL(EC_CMD_THERMAL_SET_THRESHOLD), \
54 	TRACE_SYMBOL(EC_CMD_THERMAL_GET_THRESHOLD), \
55 	TRACE_SYMBOL(EC_CMD_THERMAL_AUTO_FAN_CTRL), \
56 	TRACE_SYMBOL(EC_CMD_TMP006_GET_CALIBRATION), \
57 	TRACE_SYMBOL(EC_CMD_TMP006_SET_CALIBRATION), \
58 	TRACE_SYMBOL(EC_CMD_TMP006_GET_RAW), \
59 	TRACE_SYMBOL(EC_CMD_MKBP_STATE), \
60 	TRACE_SYMBOL(EC_CMD_MKBP_INFO), \
61 	TRACE_SYMBOL(EC_CMD_MKBP_SIMULATE_KEY), \
62 	TRACE_SYMBOL(EC_CMD_MKBP_SET_CONFIG), \
63 	TRACE_SYMBOL(EC_CMD_MKBP_GET_CONFIG), \
64 	TRACE_SYMBOL(EC_CMD_KEYSCAN_SEQ_CTRL), \
65 	TRACE_SYMBOL(EC_CMD_GET_NEXT_EVENT), \
66 	TRACE_SYMBOL(EC_CMD_TEMP_SENSOR_GET_INFO), \
67 	TRACE_SYMBOL(EC_CMD_HOST_EVENT_GET_B), \
68 	TRACE_SYMBOL(EC_CMD_HOST_EVENT_GET_SMI_MASK), \
69 	TRACE_SYMBOL(EC_CMD_HOST_EVENT_GET_SCI_MASK), \
70 	TRACE_SYMBOL(EC_CMD_HOST_EVENT_GET_WAKE_MASK), \
71 	TRACE_SYMBOL(EC_CMD_HOST_EVENT_SET_SMI_MASK), \
72 	TRACE_SYMBOL(EC_CMD_HOST_EVENT_SET_SCI_MASK), \
73 	TRACE_SYMBOL(EC_CMD_HOST_EVENT_CLEAR), \
74 	TRACE_SYMBOL(EC_CMD_HOST_EVENT_SET_WAKE_MASK), \
75 	TRACE_SYMBOL(EC_CMD_HOST_EVENT_CLEAR_B), \
76 	TRACE_SYMBOL(EC_CMD_SWITCH_ENABLE_BKLIGHT), \
77 	TRACE_SYMBOL(EC_CMD_SWITCH_ENABLE_WIRELESS), \
78 	TRACE_SYMBOL(EC_CMD_GPIO_SET), \
79 	TRACE_SYMBOL(EC_CMD_GPIO_GET), \
80 	TRACE_SYMBOL(EC_CMD_I2C_READ), \
81 	TRACE_SYMBOL(EC_CMD_I2C_WRITE), \
82 	TRACE_SYMBOL(EC_CMD_CHARGE_CONTROL), \
83 	TRACE_SYMBOL(EC_CMD_CONSOLE_SNAPSHOT), \
84 	TRACE_SYMBOL(EC_CMD_CONSOLE_READ), \
85 	TRACE_SYMBOL(EC_CMD_BATTERY_CUT_OFF), \
86 	TRACE_SYMBOL(EC_CMD_USB_MUX), \
87 	TRACE_SYMBOL(EC_CMD_LDO_SET), \
88 	TRACE_SYMBOL(EC_CMD_LDO_GET), \
89 	TRACE_SYMBOL(EC_CMD_POWER_INFO), \
90 	TRACE_SYMBOL(EC_CMD_I2C_PASSTHRU), \
91 	TRACE_SYMBOL(EC_CMD_HANG_DETECT), \
92 	TRACE_SYMBOL(EC_CMD_CHARGE_STATE), \
93 	TRACE_SYMBOL(EC_CMD_CHARGE_CURRENT_LIMIT), \
94 	TRACE_SYMBOL(EC_CMD_EXTERNAL_POWER_LIMIT), \
95 	TRACE_SYMBOL(EC_CMD_HOST_SLEEP_EVENT), \
96 	TRACE_SYMBOL(EC_CMD_SB_READ_WORD), \
97 	TRACE_SYMBOL(EC_CMD_SB_WRITE_WORD), \
98 	TRACE_SYMBOL(EC_CMD_SB_READ_BLOCK), \
99 	TRACE_SYMBOL(EC_CMD_SB_WRITE_BLOCK), \
100 	TRACE_SYMBOL(EC_CMD_BATTERY_VENDOR_PARAM), \
101 	TRACE_SYMBOL(EC_CMD_EC_CODEC), \
102 	TRACE_SYMBOL(EC_CMD_EC_CODEC_DMIC), \
103 	TRACE_SYMBOL(EC_CMD_EC_CODEC_I2S_RX), \
104 	TRACE_SYMBOL(EC_CMD_EC_CODEC_WOV), \
105 	TRACE_SYMBOL(EC_CMD_REBOOT_EC), \
106 	TRACE_SYMBOL(EC_CMD_GET_PANIC_INFO), \
107 	TRACE_SYMBOL(EC_CMD_ACPI_READ), \
108 	TRACE_SYMBOL(EC_CMD_ACPI_WRITE), \
109 	TRACE_SYMBOL(EC_CMD_ACPI_QUERY_EVENT), \
110 	TRACE_SYMBOL(EC_CMD_CEC_WRITE_MSG), \
111 	TRACE_SYMBOL(EC_CMD_CEC_SET), \
112 	TRACE_SYMBOL(EC_CMD_CEC_GET), \
113 	TRACE_SYMBOL(EC_CMD_REBOOT), \
114 	TRACE_SYMBOL(EC_CMD_RESEND_RESPONSE), \
115 	TRACE_SYMBOL(EC_CMD_VERSION0), \
116 	TRACE_SYMBOL(EC_CMD_PD_EXCHANGE_STATUS), \
117 	TRACE_SYMBOL(EC_CMD_USB_PD_CONTROL), \
118 	TRACE_SYMBOL(EC_CMD_USB_PD_PORTS), \
119 	TRACE_SYMBOL(EC_CMD_USB_PD_POWER_INFO), \
120 	TRACE_SYMBOL(EC_CMD_CHARGE_PORT_COUNT), \
121 	TRACE_SYMBOL(EC_CMD_USB_PD_DISCOVERY), \
122 	TRACE_SYMBOL(EC_CMD_PD_CHARGE_PORT_OVERRIDE), \
123 	TRACE_SYMBOL(EC_CMD_PD_GET_LOG_ENTRY), \
124 	TRACE_SYMBOL(EC_CMD_USB_PD_MUX_INFO)
125 
126 #define CREATE_TRACE_POINTS
127 #include "cros_ec_trace.h"
128