• Raul E Rangel's avatar
    platform/chrome: cros_ec_proto: Add response tracing · 205c9326
    Raul E Rangel authored
    Add the ability to view response codes as well.
    
    I dropped the EVENT_CLASS since there is only one event per class.
    
    cros_ec_cmd has now been renamed to cros_ec_request_start.
    
    Example:
    $ echo 1 > /sys/kernel/debug/tracing/events/cros_ec/enable
    $ cat /sys/kernel/debug/tracing/trace
    
    369.416372: cros_ec_request_start: version: 0, command: EC_CMD_USB_PD_POWER_INFO
    369.420528: cros_ec_request_done: version: 0, command: EC_CMD_USB_PD_POWER_INFO, ec result: EC_RES_SUCCESS, retval: 16
    369.420529: cros_ec_request_start: version: 0, command: EC_CMD_USB_PD_DISCOVERY
    369.421383: cros_ec_request_done: version: 0, command: EC_CMD_USB_PD_DISCOVERY, ec result: EC_RES_SUCCESS, retval: 5
    Signed-off-by: default avatarRaul E Rangel <rrangel@chromium.org>
    Signed-off-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
    205c9326
cros_ec_trace.c 8.08 KB