Question about having multiple timestamp channels

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

 



Hi,
on Chrome OS devices, the architecture for sensors (such as
accelerometer and gyroscope) involves the sensors being connected to
an embedded controller, which receives interrupts from the IMU,
collects samples, and then sends an interrupt to the main CPU running
Linux.

On the CPU, there currently is an IIO device called sensor_ring, which
handles the interrupt by collecting the samples from the EC, and
pushes them to an IIO buffer.

As part of the EC --> AP communication mechanism, we collect:
- the time (in EC clock) when the sensor notified the EC;
- the time (in EC clock) when the embedded controller sent the interrupt;
- the time (in Linux clock) when the CPU received the interrupt.

We use these values (which we call respectively "a" "b" and "c"), as
input to a median filter in order to both convert EC clock to Linux
clock, and to smooth out jitter.

We have since come to realize that a median is not the best filter for
this task, and - as part of a larger redesign - would like to move
this filtering in userspace and use a different filter (most likely
either a least squares or a Kalman filter).

However, doing the filtering in userland requires us to be able to
send the a, b and c points from the IIO device on the kernel to
userspace.

My initial investigation led me to using indexing as the most viable
option to have multiple IIO_TIMESTAMP channels defined for the same
device. However, I spot a few places in the IIO framework where
channels of kind TIMESTAMP seem to have special meaning.

Is defining multiple timestamp channels via indexing a supported
operation? If not, is there any way to define such channels? Or a
better way to support our use case of providing 3 "timestamp" values
to userspace.

Any input is appreciated.



[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