linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bobby Jones <rjones@gateworks.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio@vger.kernel.org
Subject: Re: FXOS8700 Accelerometer/Magnetometer Support
Date: Tue, 10 Sep 2019 14:36:44 -0700	[thread overview]
Message-ID: <CALAE=UBhLi=B09FZhZOO3PAsjVTPDP1kkH=AG4V5UrmC=wXhWg@mail.gmail.com> (raw)
In-Reply-To: <20190714161623.0127bbcb@archlinux>

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

  reply	other threads:[~2019-09-10 21:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-03 22:48 FXOS8700 Accelerometer/Magnetometer Support Bobby Jones
2019-07-14 15:16 ` Jonathan Cameron
2019-09-10 21:36   ` Bobby Jones [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-07-03 22:39 Bobby Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALAE=UBhLi=B09FZhZOO3PAsjVTPDP1kkH=AG4V5UrmC=wXhWg@mail.gmail.com' \
    --to=rjones@gateworks.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).