Re: [PATCH v4 04/11] iio: accel: adxl313: add function to enable measurement

From: Jonathan Cameron
Date: Wed Jun 11 2025 - 11:08:43 EST


On Wed, 11 Jun 2025 10:55:26 +0200
Lothar Rubusch <l.rubusch@xxxxxxxxx> wrote:

> On Sun, Jun 8, 2025 at 5:27 PM Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
> >
> > On Sun, 1 Jun 2025 17:21:32 +0000
> > Lothar Rubusch <l.rubusch@xxxxxxxxx> wrote:
> >
> > > Rework controlling measurement and standby of the sensor. Therefore,
> > > replace writing the register directly by encapsulating this and dealing
> > > with the return value in a separte function to enable and disable
> > > measurement. This will help to avoid redundant code in all locations
> > > where the sensor configuration needs to be adjusted, thus measurement will
> > > be set to standby, in follow up patches.
> > >
> > > Further, reduce the control mask to only the measurement bit. The sleep bit
> > > actually controls a different behavior (not just putting the sensor to
> > > standby for configuration, but turning it into sleep mode) and it is not
> > > used so far. In consequence, there is no need to cover sleep bit and
> > > measurement with the same mask.
> > >
> > > Signed-off-by: Lothar Rubusch <l.rubusch@xxxxxxxxx>
> > This is a good bit to have as a precursor patch (as you have done)
> > because it is refactoring the existing code. It doesn't stand on it's
> > own though given for now there is only one caller, so I won't pick it up
> > until the patch that uses it is ready to go.
> >
>
> So, I'll leave this patch (in case I might refrase the commit message,
> and I hope this is ok). I'm going to merge [v4 02/11] [v4 05/11] and
> [v4 06/11] for a v5. Let me know if I got this wrong.
>
Sounds good to me.

J