• Gwendal Grignou's avatar
    platform/chrome: sensorhub: Add trace events for sample · d453ceb6
    Gwendal Grignou authored
    Add trace event to report samples and their timestamp coming from the
    EC. It allows to check if the timestamps are correct and the filter is
    working correctly without introducing too much latency.
    
    To enable these events:
    
    cd /sys/kernel/debug/tracing/
    echo 1 > events/cros_ec/enable
    echo 0 > events/cros_ec/cros_ec_request_start/enable
    echo 0 > events/cros_ec/cros_ec_request_done/enable
    echo 1 > tracing_on
    cat trace_pipe
    Observe event flowing:
    irq/105-chromeo-95      [000] ....   613.659758: cros_ec_sensorhub_timestamp: ...
    irq/105-chromeo-95      [000] ....   613.665219: cros_ec_sensorhub_filter: dx: ...
    Signed-off-by: default avatarGwendal Grignou <gwendal@chromium.org>
    Signed-off-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
    d453ceb6
cros_ec_sensorhub_ring.c 30.5 KB