Wed, May 31, 2023 at 02:25:12PM +0000, inv.git-commit@xxxxxxx kirjoitti: > From: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@xxxxxxx> > > Rename common module to inv_sensors_timestamp, add configuration > at init (chip internal clock, acceptable jitter, ...) and update > inv_icm42600 driver integration. ... > /* check that period is acceptable */ > - period_min = INV_ICM42600_TIMESTAMP_MIN_PERIOD(chip_period) * mult; > - period_max = INV_ICM42600_TIMESTAMP_MAX_PERIOD(chip_period) * mult; > + period_min = ts->min_period * mult; > + period_max = ts->max_period * mult; Side note: wondering if linear_range.h APIs can somehow help with this. > if (period > period_min && period < period_max) > return true; > else > return false; Another side note: this can be simplified in a follow up at some point. ... > - /* if interrupt interval is valid, sync with interrupt timestamp */ > + /* if interrupt interval is valid, align with interrupt timestamp */ Not sure why this change, but probably it's inline with the rest of the changes. ... > --- /dev/null > +++ b/include/linux/iio/common/inv_sensors_timestamp.h Have you used -M -C for `git-format-patch`? ... > +#ifndef INV_SENSORS_TIMESTAMP_H_ > +#define INV_SENSORS_TIMESTAMP_H_ > +#include <linux/kernel.h> While I see this in the original code, I have found no evidence this header is used here in any possible way. Actually kernel.h in the _headers_ is quite discouraged. > +#endif -- With Best Regards, Andy Shevchenko