mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-01 02:33:57 +00:00
d2651a43f3
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@gmail.com> Link: https://patch.msgid.link/20240609233826.330516-16-vassilisamir@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> |
||
---|---|---|
.. | ||
ags02ma.c | ||
ams-iaq-core.c | ||
atlas-ezo-sensor.c | ||
atlas-sensor.c | ||
bme680_core.c | ||
bme680_i2c.c | ||
bme680_spi.c | ||
bme680.h | ||
ccs811.c | ||
ens160_core.c | ||
ens160_i2c.c | ||
ens160_spi.c | ||
ens160.h | ||
Kconfig | ||
Makefile | ||
pms7003.c | ||
scd4x.c | ||
scd30_core.c | ||
scd30_i2c.c | ||
scd30_serial.c | ||
scd30.h | ||
sgp30.c | ||
sgp40.c | ||
sps30_i2c.c | ||
sps30_serial.c | ||
sps30.c | ||
sps30.h | ||
sunrise_co2.c | ||
vz89x.c |