iio: imu: st_lsm6dsx: reset hw ts after resume
authorLorenzo Bianconi <lorenzo@kernel.org>
Mon, 13 Jul 2020 11:40:19 +0000 (13:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Aug 2020 11:07:23 +0000 (13:07 +0200)
commitd7ccfcd8445971bd2fce1ee2b8ba4e566e76754a
tree7b4555a75c6aee396ae7a9a61eaab6a60cce5aa2
parent13d49c2043a3c9dc40ece310b57962f5afaeaefa
iio: imu: st_lsm6dsx: reset hw ts after resume

commit a1bab9396c2d98c601ce81c27567159dfbc10c19 upstream.

Reset hw time samples generator after system resume in order to avoid
disalignment between system and device time reference since FIFO
batching and time samples generator are disabled during suspend.

Fixes: 213451076bd3 ("iio: imu: st_lsm6dsx: add hw timestamp support")
Tested-by: Sean Nyekjaer <sean@geanix.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c