File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
drivers/iio/imu/inv_icm42600 Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 1717#include <linux/regmap.h>
1818
1919#include <linux/iio/iio.h>
20+ #include <linux/iio/common/inv_sensors_timestamp.h>
2021
2122#include "inv_icm42600.h"
2223#include "inv_icm42600_buffer.h"
@@ -725,6 +726,8 @@ static int inv_icm42600_suspend(struct device *dev)
725726static int inv_icm42600_resume (struct device * dev )
726727{
727728 struct inv_icm42600_state * st = dev_get_drvdata (dev );
729+ struct inv_sensors_timestamp * gyro_ts = iio_priv (st -> indio_gyro );
730+ struct inv_sensors_timestamp * accel_ts = iio_priv (st -> indio_accel );
728731 int ret ;
729732
730733 mutex_lock (& st -> lock );
@@ -745,9 +748,12 @@ static int inv_icm42600_resume(struct device *dev)
745748 goto out_unlock ;
746749
747750 /* restore FIFO data streaming */
748- if (st -> fifo .on )
751+ if (st -> fifo .on ) {
752+ inv_sensors_timestamp_reset (gyro_ts );
753+ inv_sensors_timestamp_reset (accel_ts );
749754 ret = regmap_write (st -> map , INV_ICM42600_REG_FIFO_CONFIG ,
750755 INV_ICM42600_FIFO_CONFIG_STREAM );
756+ }
751757
752758out_unlock :
753759 mutex_unlock (& st -> lock );
You can’t perform that action at this time.
0 commit comments