On Fri, 28 Oct 2022 13:07:47 +0000 Dan Robertson <dan@xxxxxxxxxxxxxxx> wrote: > On Sun, Oct 02, 2022 at 03:41:33PM +0100, Jonathan Cameron wrote: > > From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> > > > > The regulator enables were after the check on the chip variant, which was > > very unlikely to return a correct value when not powered. > > Presumably all the device anyone is testing on have a regulator that > > is already powered up when this code runs for reasons beyond the scope > > of this driver. Move the read call down a few lines. > > > > Fixes: 3cf7ded15e40 ("iio: accel: bma400: basic regulator support") > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> > > Reviewed-by: Dan Robertson <dan@xxxxxxxxxxxxxxx> > > Thanks for catching this! Applied to the fixes-togreg branch of iio.git and marked for stable. Thanks, Jonathan > > Cheers, > > - Dan