Re: [PATCH v2 RESEND] iio: accel: adxl345: update period cache after successful write
From: Jonathan Cameron
Date: Fri Oct 23 2026 - 22:44:07 EST
On Mon, 19 Oct 2026 07:53:28 -0500
Iron Berrington <berringtoni36@xxxxxxxxx> wrote:
> Hi Andy,
>
> Thanks for the review and the Reviewed-by tag. I'll address the
> time-unit constants in a separate cleanup patch, keeping this fix
> focused on updating the cache after successful writes.
>
Applied.
> Best regards,
> Wenqiang
>
>
> On Mon, 19 Oct 2026 13:21:44 +0300, Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxx> wrote:
> > On Sun, Oct 18, 2026 at 09:42:00PM +0800, Wenqiang Zhao via B4 Relay wrote:
> >
> > > The ADXL345 event-period read path returns st->inact_time_ms. The setters
> > > for inactivity, free-fall and the ODR-derived default currently update
> > > this cache before writing TIME_INACT or TIME_FF. If the regmap write
> > > fails, the sysfs write reports an error but a subsequent read returns
> > > the requested period even though it was not programmed.
> > >
> > > Update the cached period only after the corresponding regmap write
> > > succeeds.
> >
> > Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
> > Assuming that my comments may lead to a separate cleanup patch later on.
> >
> > --
> > With Best Regards,
> > Andy Shevchenko