Re: [PATCH v2 19/19] iio: chemical: bme680: Refactorize reading functions

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

 



On Sun, Jun 09, 2024 at 12:12:34PM +0100, Jonathan Cameron wrote:
> On Thu,  6 Jun 2024 23:23:13 +0200
> Vasileios Amoiridis <vassilisamir@xxxxxxxxx> wrote:
> 
> > The reading of the pressure and humidity value, requires an update
> > of the t_fine variable which happens by reading the temperature
> > value.
> > 
> > So the bme680_read_{press/humid}() functions of the above sensors
> > are internally calling the equivalent bme680_read_temp() function
> > in order to update the t_fine value. By just looking at the code
> > this relation is a bit hidden and is not easy to understand why
> > those channels are not independent.
> > 
> > This commit tries to clear these thing a bit by splitting the
> > bme680_{read/compensate}_{temp/press/humid}() to the following:
> > 
> > i. bme680_read_{temp/press/humid}_adc(): read the raw value from
> > the sensor.
> > 
> > ii. bme680_calc_t_fine(): calculate the t_fine variable.
> > 
> > iii. bme680_get_t_fine(): get the t_fine variable.
> > 
> > iv. bme680_compensate_{temp/press/humid}(): compensate the adc
> > values and return the calculated value.
> > 
> > v. bme680_read_{temp/press/humid}(): combine calls of the
> > aforementioned functions to return the requested value.
> > 
> > Signed-off-by: Vasileios Amoiridis <vassilisamir@xxxxxxxxx>
> 
> LGTM. All the other patches I didn't comment on are fine.
> 5 can wait for the non fix part of the series as it's just a typo.
> 7-14 look fine but probably have to wait for 1-4 and (v3 of) 6
> to get into the upstream of iio.git.
> 
> 16,18,19 all look good.
> 
> Note given you have two series that are dependent on fixes
> I might take v3 of patch 6 then send another fixes pull request
> before I rebase the main togreg branch on char-next (once it
> has those fixes). 
> 
> Getting complicated this cycle as a lot in flight!
> 
> Thanks,
> 
> Jonathan

Hi Jonathan,

Thank you very much again for the review, I will come back with the
requested fixes! I would appreciate a lot if you could push this fix
a bit forward, thanks!

Cheers,
Vasilis




[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