Re: FXOS8700 Accelerometer/Magnetometer Support

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

 



Hello Jonathan and iio,

I've finally been able to circle back to this effort. I've spent some
time last week referencing the misc driver I linked to originally
while refactoring the BMI160 imu driver as a starting point (it
honestly just seemed like the simplest 2-sensor device) and am a
little stuck with the implementation.

When defining the iio_chan_spec structs that will be assigned to the
iio_dev.channels array, everything makes sense when the fxos8700 only
has 1 sensor enabled. It is my understanding that the
iio_info.read_raw function will be called with the type/channel and
the proper regmap calls I've set up will be made. Now my confusion
begins when considering how to support both devices enabled. According
to the datasheet this means that "hybrid" mode is enabled, which
halves the data rate and requires a single burst transaction to read
all of the output data registers. If any data output register is not
read, that data will be lost. So when the IIO subsystem calls on a
single channel for data and the unit is in hybrid mode I don't see how
I can avoid loss of data.

I'm assuming there is a different way I should be setting up the
iio_info and iio_chan_spec structs but I'm not sure how to go about
it. I believe this may have something to do with the
iio_info.read_raw_multi function and the
iio_chan_spec.info_mask_shared* fields. Can anyone provide input? If
it helps I've posted my wip at
https://github.com/Bobby-Soliis-Jones/iio_imu_fxos8700.

Thanks in advance!
Bobby Jones



[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