Skip to content
Commit 58a2109f authored by Raul E Rangel's avatar Raul E Rangel Committed by Enric Balletbo i Serra
Browse files

platform/chrome: cros_ec_proto: Add trace event to trace EC commands



This is useful to see which EC commands are being executed and when.

To enable:

    echo 1 > /sys/kernel/debug/tracing/events/cros_ec/enable

Example:

    cros_ec_cmd: version: 0, command: EC_CMD_GET_VERSION
    cros_ec_cmd: version: 0, command: EC_CMD_GET_PROTOCOL_INFO
    cros_ec_cmd: version: 1, command: EC_CMD_GET_CMD_VERSIONS
    cros_ec_cmd: version: 1, command: EC_CMD_USB_PD_CONTROL

The list of current commands is generated using the following script:

    sed -n 's/^#define \(EC_CMD_[[:alnum:]_]*\)\s.*/\tTRACE_SYMBOL(\1),\\/p' include/linux/mfd/cros_ec_commands.h

Signed-off-by: default avatarRaul E Rangel <rrangel@chromium.org>
Reviewed-by: default avatarRoss Zwisler <zwisler@google.com>
Reviewed-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
parent 81f6ec23
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment