To help debug sensor issue, gather latest raw sensor information:
for i in $(find /sys/ -name cros-ec-dev\*) ; do
find $i -name \*_raw -print -exec cat {} \;
done
Will output:
/sys/devices/pci0000:00/0000:00:1f.0/PNP0C09:00/GOOG0004:00/cros-ec-dev.0/cros-ec-gyro.0/iio:device2/in_anglvel_x_raw
0
/sys/devices/pci0000:00/0000:00:1f.0/PNP0C09:00/GOOG0004:00/cros-ec-dev.0/cros-ec-gyro.0/iio:device2/in_anglvel_y_raw
0
/sys/devices/pci0000:00/0000:00:1f.0/PNP0C09:00/GOOG0004:00/cros-ec-dev.0/cros-ec-gyro.0/iio:device2/in_anglvel_z_raw
0
/sys/devices/pci0000:00/0000:00:1f.0/PNP0C09:00/GOOG0004:00/cros-ec-dev.0/cros-ec-accel.0/iio:device0/in_accel_x_raw
-71
/sys/devices/pci0000:00/0000:00:1f.0/PNP0C09:00/GOOG0004:00/cros-ec-dev.0/cros-ec-accel.0/iio:device0/in_accel_y_raw
2948
/sys/devices/pci0000:00/0000:00:1f.0/PNP0C09:00/GOOG0004:00/cros-ec-dev.0/cros-ec-accel.0/iio:device0/in_accel_z_raw
2870
/sys/devices/pci0000:00/0000:00:1f.0/PNP0C09:00/GOOG0004:00/cros-ec-dev.0/cros-ec-accel.1/iio:device1/in_accel_x_raw
-150
/sys/devices/pci0000:00/0000:00:1f.0/PNP0C09:00/GOOG0004:00/cros-ec-dev.0/cros-ec-accel.1/iio:device1/in_accel_y_raw
-89
/sys/devices/pci0000:00/0000:00:1f.0/PNP0C09:00/GOOG0004:00/cros-ec-dev.0/cros-ec-accel.1/iio:device1/in_accel_z_raw
4256
It will help figure out if a sensor is stuck if we also know the physical position of the device when the snapshot is taken.
Comment 1 by zalcorn@chromium.org
, Mar 9 2018