FIXUP: CHROMIUM: iio: cros_ec: default to ec fifo size

If the EC is too old to report a sensor's max_events, default to the
size previously used by the sensor HAL instead of the minimum fifo size.

This avoids CTS failures caused by using the minimum fifo size when
we don't know a sensor's fifo size instead of overestimating fifo size.
Declaring a smaller fifo size than actually exists causes the CTS test to
get more data than it expects, causing failure (fix for cl/476174).

TEST=builds and works on reef with older EC that don't make sensor
max_events available to kernel; verified value of max_events on older
EC is 1365, verified cts sensor batching tests pass under CTSvs using cmd
"cts-tradefed run commandAndExit cts -s <IP> -m CtsHardwareTestCases -t

Change-Id: I9e19af7024f51d268e9cc4ef0b7467889b776467
Signed-off-by: Nick Vaccaro <>
Commit-Ready: Gwendal Grignou <>
Reviewed-by: Gwendal Grignou <>
1 file changed