motion: Fix last timestamp calculation
motion: Fix last timestamp calculation

last_collection is used for sensor in forced mode to be sure we are not
calling the read routine too often. We should update last_collection even
when the reading fails, and not on the interrupt path.

For sensors that support interrupt, the new timing diagram is:

              /-------- data rate period ---------\
--------------+------------------------------------+-----------------> t
              |                     /\
              read (sample request)  |
              |                      Interrupt (sample available)
              \/                     |
                sensor

BUG=chrome-os-partner:59423
BRANCH=reef
TEST=Check the ALS read is not called too often even when the sensor
reports an error because the read value is not changed.

Change-Id: I2def7bbd5227cf373c1f613c9b70bc6215861008
Signed-off-by: Gwendal Grignou <190c5a5edfcf62e0246559bf31fa7548674de3ad@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/424222
Reviewed-by: Randall Spangler <62698fdbb84d1779579ee80c3f39fac22017e5bc@chromium.org>

coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec