Add support for sending Atmel TP/TS error message

This adds the support that when Pixel touchscreen/trackpad driver
atmel_mxt_ts is misbehaving, e.g. failed to update firmware, failed
to read messages from the chip, trigger crash reporter to send system
logging message for further debugging.

We also follow the policy that, for atmel/cypress logs, we only fetch
the last 30s of the logs.

TEST=1. On Pixel, replace the touchscreen firmware file
        with an empty file with the same name
     2. Force touchscreen firmware update
        /opt/google/touch/scripts/ -d atmel_mxt_ts -f -n maxtouch-ts.fw
     3. After the firmware update fails, check crash report exists at
     4. Check that the log contains only 30s of entries with "atmel" keyword.

Change-Id: If46a575491378405e60ad1ccbd39026ae6bf2033
Reviewed-by: Mike Frysinger <>
Reviewed-by: Will Drewry <>
Commit-Queue: Yufeng Shen <>
Tested-by: Yufeng Shen <>
3 files changed
tree: 0ab34506de6be6696eb9508c3fff4f3e550f8a89
  1. crash_reporter/