Re: [PATCH v1 04/17] iio: chemical: bme680: Fix sensor data read operation
From: Vasileios Amoiridis
Date: Mon Jun 03 2024 - 16:31:42 EST
On Mon, Jun 03, 2024 at 08:23:03PM +0100, Jonathan Cameron wrote:
>
> > > > +}
> > > > +
> > > > +static void bme680_wait_for_eoc(struct bme680_data *data)
> > > Don't call it wait as that implies something is being checked.
> > >
> > > bme680_conversion_sleep() or something like that.
> > >
> >
> > This sesnor has a sleep mode, so I think calling a function like that might
> > make it a bit confusing, since we are not putting the sensor into sleeping
> > mode but rather actually wait for the eoc.
>
> Hmm. Bikesheding time. I don't like wait because it generally implies a
> condition check.
>
> Maybe just go more explicit
> bme680_suspend_execution_until_conversion_done()
> bme680_suspend_execution_whilst_converting()
> or similar might be overkill but something along those lines.
>
> The suspend execution terminology lifted from man usleep
>
Well actually I realised that I can do some condition checks so I will resubmit
and we discuss again with the new feature.
Cheers,
Vasilis
> >
> > > > +{
> > > > + int wait_eoc = bme680_conversion_time_us(data->oversampling_temp +
> > > > + data->oversampling_press +
> > > > + data->oversampling_press,
> > > > + data->heater_dur);