Re: [spi-devel-general] [Patch 1/4] Industrialio Core

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jonathan Cameron
Date: Thursday, July 24, 2008 - 3:12 am

Anton Vorontsov wrote:
Hi Anton,

Agreed, sorry about that - docs are about half written and should probably have
finished them off before I posted the patch.  I'll try and get a first version
cleaned up and posted today. Main issue at the moment is getting example code
into a state where it isn't too dependent on the exact board setup I'm testing
on.

Good point. No idea why I did it like that!


Thanks for the pointer, I'll do that.
I'd argue this is actually connected to improving the usability of the system.

I would envision that the set of definitions (probably broken out into specific
headers for different classes of device) and will grow considerably. If a
particular parameter is available in say 2 drivers, or looks like it will be,
then it will get moved to the main headers rather than being driver specific.

The basic advantages of doing it this way are concerned with user readability.
If we know the device is an accelerometer rather than a general ADC is would be
silly to have the user guessing which of the inputs are accelerations rather
than say temperature readings. Clearly there are issues with definitions of axes
on these devices but that will be something to clear up by clear documentation
(pick a standard and stick to it!).

Clearly there are cases, for example where an accelerometer is attached via a
generic ADC in which we don't have the inherent ability to identify the inputs
from the generic adc driver.  Given this is a common setup, there may well be
some scope for custom drivers for any common sensor circuits or indeed providing
a way specifying this in a board config.

It will be interesting to see how this pans out.

What I also forgot to mention alongside the patches is that each driver should
be accompanied by a userspace header file providing conversion function
to real world units as appropriate. This is clearly required to interpret the
data coming out of the ring buffers (which will always be as raw as possible).

There is also the question of whether the outputs in sysfs of say acceleration
should be converted to SI units or left as raw readings. For now I'm inclined
to leave them raw as the calibration of such sensors within systems is fairly
complex and often done as an offline process.  However I'm definitely open
to other opinions on this.


Thanks for taking a look and providing feedback.
--
Jonathan Cameron
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[Patch 0/4] IndustrialIO subsystem (ADCs, accelerometers etc), Jonathan Cameron, (Wed Jul 23, 10:00 am)
Re: [Patch 3/4] ST LIS3L02DQ accelerometer, Alan Cox, (Wed Jul 23, 10:07 am)
[Patch 1/4] Industrialio Core, Jonathan Cameron, (Wed Jul 23, 10:08 am)
[Patch 2/4] Max1363 (and similar) ADCs, Jonathan Cameron, (Wed Jul 23, 10:11 am)
[Patch 3/4] ST LIS3L02DQ accelerometer, Jonathan Cameron, (Wed Jul 23, 10:14 am)
[Patch 4/4] VTI SCA3000 Series accelerometer driver, Jonathan Cameron, (Wed Jul 23, 10:17 am)
Re: [Patch 3/4] ST LIS3L02DQ accelerometer, Jonathan Cameron, (Wed Jul 23, 10:44 am)
Re: [Patch 0/4] IndustrialIO subsystem (ADCs, acceleromete ..., Henrique de Moraes H ..., (Wed Jul 23, 10:48 am)
Re: [Patch 1/4] Industrialio Core, Anton Vorontsov, (Wed Jul 23, 11:31 am)
Re: [Patch 1/4] Industrialio Core, Eric Piel, (Thu Jul 24, 2:01 am)
Re: [spi-devel-general] [Patch 1/4] Industrialio Core, Jonathan Cameron, (Thu Jul 24, 3:12 am)
Re: [spi-devel-general] [Patch 1/4] Industrialio Core, Jonathan Cameron, (Thu Jul 24, 3:33 am)
Re: [spi-devel-general] [Patch 1/4] Industrialio Core, Jonathan Cameron, (Thu Jul 24, 4:56 am)
[Patch 5/4] IndustrialIO subsystem very early cut of docum ..., Jonathan Cameron, (Thu Jul 24, 10:57 am)