Re: [PATCH v3 2/7] iio: pressure: bmp280: Add support for bmp280 soft reset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Aug 24, 2024 at 01:16:14PM +0200, Vasileios Amoiridis wrote:
> On Fri, Aug 23, 2024 at 10:13:57PM +0300, Andy Shevchenko wrote:
> > On Fri, Aug 23, 2024 at 08:17:09PM +0200, Vasileios Amoiridis wrote:

...

> > > +	usleep_range(data->start_up_time, data->start_up_time + 500);
> > 
> > Seems long enough to warrant the comment. Also, why not fsleep()?
> 
> The datasheet of the sensor, and the published API from Bosch [1] 
> require the startup_time for this procedure, it's not something that
> came up from my mind. That's why I didn't add any comment.

The comment usually needed on the basis of how long we have to sleep.
To me ~1ms warrants that as it's long enough timeout on modern (GHz
frequency range) CPUs.

-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux