mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
4241665e6e
A read operation is happening as follows:
a) Set sensor to forced mode
b) Sensor measures values and update data registers and sleeps again
c) Read data registers
In the current implementation the read operation happens immediately
after the sensor is set to forced mode so the sensor does not have
the time to update properly the registers. This leads to the following
2 problems:
1) The first ever value which is read by the register is always wrong
2) Every read operation, puts the register into forced mode and reads
the data that were calculated in the previous conversion.
This behaviour was tested in 2 ways:
1) The internal meas_status_0 register was read before and after every
read operation in order to verify that the data were ready even before
the register was set to forced mode and also to check that after the
forced mode was set the new data were not yet ready.
2) Physically changing the temperature and measuring the temperature
This commit adds the waiting time in between the set of the forced mode
and the read of the data. The function is taken from the Bosch BME68x
Sensor API [1].
[1]: https://github.com/boschsensortec/BME68x_SensorAPI/blob/v4.4.8/bme68x.c#L490
Fixes:
|
||
---|---|---|
.. | ||
accel | ||
adc | ||
addac | ||
afe | ||
amplifiers | ||
buffer | ||
cdc | ||
chemical | ||
common | ||
dac | ||
dummy | ||
filter | ||
frequency | ||
gyro | ||
health | ||
humidity | ||
imu | ||
light | ||
magnetometer | ||
multiplexer | ||
orientation | ||
position | ||
potentiometer | ||
potentiostat | ||
pressure | ||
proximity | ||
resolver | ||
temperature | ||
test | ||
trigger | ||
iio_core_trigger.h | ||
iio_core.h | ||
industrialio-acpi.c | ||
industrialio-backend.c | ||
industrialio-buffer.c | ||
industrialio-configfs.c | ||
industrialio-core.c | ||
industrialio-event.c | ||
industrialio-gts-helper.c | ||
industrialio-sw-device.c | ||
industrialio-sw-trigger.c | ||
industrialio-trigger.c | ||
industrialio-triggered-event.c | ||
inkern.c | ||
Kconfig | ||
Makefile | ||
TODO |