platform/chrome: cros_ec_sensorhub: Fix EC timestamp overflow
authorGwendal Grignou <gwendal@chromium.org>
Tue, 30 Jun 2020 07:52:03 +0000 (00:52 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Sep 2020 09:29:16 +0000 (11:29 +0200)
commitb7850ba6edf0036596828ce540a8a376ea067aba
tree4bc0a448bfe42df3ccc82777a5665092de03d208
parentc71c249310b535e91b0991489f08a469b678838a
platform/chrome: cros_ec_sensorhub: Fix EC timestamp overflow

[ Upstream commit e48bc01ed5adec203676c735365373b31c3c7600 ]

EC is using 32 bit timestamps (us), and before converting it to 64bit
they were not casted, so it would overflow every 4s.
Regular overflow every ~70 minutes was not taken into account either.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/platform/chrome/cros_ec_sensorhub_ring.c