Re: [spi-devel-general] Accelerometer, Gyros and ADC's etc within the kernel.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <mgross@...>
Cc: Jonathan Cameron <Jonathan.Cameron@...>, <spi-devel-general@...>, <linux-kernel@...>, LM Sensors <lm-sensors@...>
Date: Wednesday, May 21, 2008 - 5:40 am

Hi Mark,


That's certainly interesting and I guess one of the easiest ways of getting data 
from spi to a desktop machine. I'll admit my interest is more with embedded 
machines.

Yes, and that means we would use the delights of platform data and the generic 
gpio subsystem.  Although I believe generic gpio isn't available on every 
platform as yet, it is getting there and is certainly in place for ARM (and 
cleans up an awful lot of hardware interfaces!)
Yes, the intention would not be to generalize the hardware comms, but rather the
interface on the user side.  This is similar to a number of other subsystems 
such as hwmon, where you share functionality as much as possible, but allow very 
different approaches to things like actual hardware register reads as and when 
they are necessary.

Definitely. Obviously the accuracy of this time stamp is going to be limited by
the variable nature of when an interrupt handler picks it up, but knowledge of 
the device specs can allow filtering of this timing data.  This is certainly 
something we would want to consider at a later date although it may well be more 
sensible to leave this to userspace applications.

Indeed.  This is well handled by the SPI subsystem. I've spent far too much time 
with a scope recently fiddling with these parameters for badly documented chips!

Agreed.  With this sort of device two modes would be needed (and are supported 
by the hardware).  The first gives direct data access and the second uses the 
ring buffer.  Which you use would obviously be dependent on the application. 
Some applications want the most recent data on all occasions, whilst some will 
be more interested in ensuring that all data is captured.


The question here is concerned with standardising mainly the userspace 
interfaces (and hardware interfaces only when appropriate). Some of these 
devices (the ST accel above for example) support multiple hardware interfaces 
specs (I2C and SPI for that one).  So in a similar way to it making sense to 
group all TV adapters irrespective of how they are interfaced to the computer, 
in order to ensure a consistent interface to user space, it makes sense to share 
these interfaces amongst drivers talking to these devices irrespective of what 
their hardware interface is.

Thanks,

--
Jonathan Cameron

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Accelerometer, Gyros and ADC's etc within the kernel., Jonathan Cameron, (Tue May 20, 6:04 am)
Re: Accelerometer, Gyros and ADC's etc within the kernel., David Brownell, (Wed May 21, 8:53 pm)
Re: Accelerometer, Gyros and ADC's etc within the kernel., David Brownell, (Tue May 27, 7:42 pm)
Re: [spi-devel-general] Accelerometer, Gyros and ADC's etc w..., Jonathan Cameron, (Wed May 21, 5:40 am)
Re: Accelerometer etc subsystem (Update on progress), Jonathan Cameron, (Thu Jun 26, 2:01 pm)
Re: Accelerometer etc subsystem (Update on progress), Ben Nizette, (Thu Jun 26, 11:29 pm)
Re: [lm-sensors] Accelerometer etc subsystem (Update on prog..., Jonathan Cameron, (Sat Jun 28, 11:34 am)
Re: Accelerometer etc subsystem (Update on progress), Randy Dunlap, (Thu Jun 26, 10:39 pm)
Re: Accelerometer etc subsystem (Update on progress), Jonathan Cameron, (Thu Jun 26, 2:26 pm)
Re: Accelerometer, Gyros and ADC's etc within the kernel., David Brownell, (Wed May 21, 8:52 pm)
Re: [spi-devel-general] Accelerometer, Gyros and ADC's etc w..., Jonathan Cameron, (Mon May 26, 12:23 pm)
Re: Accelerometer, Gyros and ADC's etc within the kernel., Dmitry Torokhov, (Wed May 21, 9:49 am)
Re: Accelerometer, Gyros and ADC's etc within the kernel., Henrique de Moraes Holschuh..., (Wed May 21, 10:09 am)
Re: Accelerometer, Gyros and ADC's etc within the kernel., Jonathan Cameron, (Wed May 21, 6:04 am)