linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Popa, Stefan Serban" <StefanSerban.Popa@analog.com>
To: "jic23@kernel.org" <jic23@kernel.org>
Cc: "lars@metafoo.de" <lars@metafoo.de>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	"Hennerich, Michael" <Michael.Hennerich@analog.com>,
	"Ardelean, Alexandru" <alexandru.Ardelean@analog.com>,
	"Bogdan, Dragos" <Dragos.Bogdan@analog.com>
Subject: IIO channel type for status/error flag indicators
Date: Wed, 20 Mar 2019 14:53:50 +0000	[thread overview]
Message-ID: <1553093626.13791.37.camel@analog.com> (raw)

Hello,

We are currently working on a new adis16495 IMU driver which is an upgrade
from the adis16480 family: https://www.analog.com/media/en/technical-docume
ntation/data-sheets/ADIS16495.pdf.

This new chip supports a feature called "Burst Read Function" (page 13 in
the datasheet). The burst read function (BRF) provides a method for reading
a batch of data (status, temperature, gyroscopes, accelerometers, time
stamp/data counter, and CRC code), which does not require a stall
time between each 16-bit segment and only requires one command
on the DIN line to initiate.

Most of the data read in this way can be attributed to a type of channel: 
IIO_TEMP, IIO_ANGL_VEL, IIO_ACCEL, etc. However, there is no equivalent for
the status and CRC. The status register provides various error flags such
as spi communication error, sensor failure, sync error, etc (Table 18 in
the datasheet). This information together with the CRC error should be
exposed to the user space. What is the best way to do it? 

The most obvious way, but not necessarily the correct one, would be to add
a new channel type called something like IIO_STATUS or IIO_FLAG. Is this
acceptable?

A more or less similar burst read function has been previously implemented
as part of the adis16400 driver. Although a burst read will also produce
diagnostic status data, it was ignored in the driver implementation.

Looking forward to any suggestion.

-Stefan

             reply	other threads:[~2019-03-20 14:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-20 14:53 Popa, Stefan Serban [this message]
2019-03-24 18:00 ` IIO channel type for status/error flag indicators Jonathan Cameron
2019-03-28 18:38   ` Popa, Stefan Serban
2019-03-31 11:11     ` Jonathan Cameron
2019-04-01 12:38       ` Popa, Stefan Serban

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=1553093626.13791.37.camel@analog.com \
    --to=stefanserban.popa@analog.com \
    --cc=Dragos.Bogdan@analog.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=alexandru.Ardelean@analog.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --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).