linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Best practices for sending digital data
@ 2018-02-07 22:15 Pavel Roskin
  2018-02-08 10:18 ` Jonathan Cameron
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Roskin @ 2018-02-07 22:15 UTC (permalink / raw)
  To: linux-iio

Hi,

I'm writing an IIO driver for custom IMU hardware. The most important
output is analog. However, the hardware also provides very important
digital data about the status of the measurement.

The register is basically a bitmask. Some of the bits are pertinent to
the specific measurement. They indicate whether the data is valid and
whether the measurements are saturated. So it makes sense to put them
to the same buffer as the analog measurements rather than use
attributes.

What would be the recommended channel type? Is that IIO_INDEX or maybe
IIO_COUNT? Or should I patch the kernel to add IIO_DIGITAL or
IIO_BITMAP?

On a related note, why is IIO so hard to extend with new channel types
and attributes? Why cannot I add angular acceleration in the driver
without patching the IIO subsystem? Why cannot I use yaw, pitch and
roll instead of X, Y and Z as the attributes? Why is IIO_MOD_CO2
defined but IIO_MOD_O2 is not, let alone IIO_MOD_DIMETHYLHYDRAZINE?

I understand that the IIO layer tries to be helpful with
standardization, but I believe it's too restrictive.

-- 
Regards,
Pavel Roskin

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-02-10 15:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-07 22:15 Best practices for sending digital data Pavel Roskin
2018-02-08 10:18 ` Jonathan Cameron
2018-02-08 17:51   ` Lars-Peter Clausen
2018-02-10 15:51     ` Jonathan Cameron

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).