From: Jonathan Cameron <jic23@cam.ac.uk>
To: Greg KH <gregkh@suse.de>
Cc: Nathan Royer <nroyer@invensense.com>,
Andrew Morton <akpm@linux-foundation.org>,
Jiri Kosina <jkosina@suse.cz>, Alan Cox <alan@linux.intel.com>,
Jean Delvare <khali@linux-fr.org>,
linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
Torokhov <dmitry.torokhov@gmail.com>
Subject: Re: [PATCH 01/11] misc: inv_mpu primary header file and README file.
Date: Fri, 01 Jul 2011 10:00:24 +0100 [thread overview]
Message-ID: <4E0D8CA8.5040208@cam.ac.uk> (raw)
In-Reply-To: <20110701030904.GA3748@suse.de>
On 07/01/11 04:09, Greg KH wrote:
> On Thu, Jun 30, 2011 at 07:18:17PM -0700, Nathan Royer wrote:
>> This files defines the userspace interface and how to integrate it into a
>> platform.
>>
>> Signed-off-by: Nathan Royer <nroyer@invensense.com>
>> ---
>>
>> This is the first of many patch files for the inv_mpu driver in its current
>> state. This is our first time submitting this driver, so I expect there to be
>> a lot wrong with it, and expect to need to fix many things.
>>
>> The inv_mpu driver attepts to implement a Motion Processing Unit interface. As
>> a unit, an accelerometer, magnetometer, gyroscope, and/or altimiter data is
>> fused together to produce calibrated data and a quaternion.
>>
>> The inv_mpu driver interface is currently implemented as a misc device, but may
>> need to change to include both sysfs attributes and input devices. I think
>> that we will continue to need the ioctl interface, but many of the ioctls can
>> be replace by attributes and/or input devices.
>>
>> The mpu3050 has an i2c master interface designed to control an accelerometer
>> and a Digital Motion Processor (DMP) used to perform sensor fusion on the
>> gyroscope and accelerometer. This data is then read out of the mpu3050 fifo
>> and sent to userspace for distribution and optional propritary processing, such
>> as fusion with a compass to produce a 9 axis quaternion.
>>
>> Some question I have at the start are:
>> 1) Is there a master design or standard interface for Motion Processing
>> devices, specifically ones that do calibration, sensor fusion, and or have a
>> micro-controller to do some of this work.
Some of Analog's parts are doing a very basic form of this (bit of integration etc).
Ultimately in their case it is transparent, so they just look like additional data
channels. Here it looks more sophisticated.
>> 2) Is there a standard way to integrate user space components with kernel side
>> components.
>> 3) Should data be pushed back to the driver from userspace, and made available
>> as an input device or should it remain as a character device.
Depends on the use case. If you have to do userspace processing, then uinput
does this nicely.
>> 4) Can a 4 element quaternion be added to input.h:
>> ABS_QUATERNION_1 ABS_QUATERNION_I ABS_QUATERNION_J ABS_QUATERNION_K
>> for <1, i, j, k>
>> 5) Should we instead use a rotation vector as defined in the Android sensor:
>> http://developer.android.com/reference/android/hardware/SensorEvent.html
If you hardware is producing quaternions directly you are not going to want to
the necessary sin / cos in kernel. Trivial in userspace though.
>> 6) Are there any other major design concerns?
The big one Alan and Jean have commented on. This device just has slave i2c devices
they should have their own drivers if at all possible.
>
> Shouldn't you be using the iio subsystem for the kernel/user interface
> as I think it handles most of this for you already, right?
Few bits we haven't seen before, but nothing that can't be easily added.
We do have a usual question here of whether this is better as an input device
though. Dmitry, what is your view on this one? Certainly doesn't want to end
up in misc. Alan (in other branch) has highlighted an existing driver for the
mpu part.
>
>> 7) Can an input device also have a character device interface for proprietary
>> customization.
>
> What do you mean by this?
>
> greg k-h
>
next prev parent reply other threads:[~2011-07-01 8:52 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-01 2:18 Nathan Royer
2011-07-01 2:18 ` [PATCH 02/11] misc: mpu3050 Register definition and Private data Nathan Royer
2011-07-01 2:18 ` [PATCH 03/11] misc: mpu3050 /dev/mpu implementation Nathan Royer
2011-07-01 2:18 ` [PATCH 04/11] misc: IRQ handling for MPU3050 and slave devices Nathan Royer
2011-07-01 2:18 ` [PATCH 05/11] misc: MPU3050 and slave device configuration Nathan Royer
2011-07-01 17:55 ` Nathan Royer
2011-07-01 2:18 ` [PATCH 06/11] misc: inv_mpu logging and debugging support Nathan Royer
2011-07-01 2:18 ` [PATCH 07/11] misc: I2C communication with the MPU3050 and slave devices Nathan Royer
2011-07-01 2:18 ` [PATCH 08/11] misc: Kconfig and Makefile changes for inv_mpu driver Nathan Royer
2011-07-01 17:10 ` Randy Dunlap
2011-07-01 2:18 ` [PATCH 09/11] misc: Add slave driver for kxtf9 accelerometer Nathan Royer
2011-07-01 2:18 ` [PATCH 10/11] misc: Add slave driver for ak8975 compass driver Nathan Royer
2011-07-01 2:18 ` [PATCH 11/11] misc: Add slave driver for bma085 pressure sensor Nathan Royer
2011-07-01 7:56 ` Alan Cox
2011-07-01 8:47 ` Jean Delvare
2011-07-01 14:28 ` Chris Wolfe
2011-07-01 14:41 ` Alan Cox
2011-07-01 15:52 ` Chris Wolfe
2011-07-01 17:00 ` Alan Cox
2011-07-01 17:56 ` Nathan Royer
2011-07-01 16:09 ` Jean Delvare
2011-07-01 9:05 ` Jonathan Cameron
2011-07-01 10:35 ` Manuel Stahl
2011-07-01 3:09 ` [PATCH 01/11] misc: inv_mpu primary header file and README file Greg KH
2011-07-01 7:29 ` Alan Cox
2011-07-01 9:00 ` Jonathan Cameron [this message]
2011-07-01 3:59 ` Chris Wolfe
2011-07-05 18:08 ` Nathan Royer
2011-07-01 7:53 ` Alan Cox
2011-07-01 9:08 ` Jonathan Cameron
2011-07-01 16:39 ` Nathan Royer
2011-07-03 11:29 ` Jonathan Cameron
2011-07-04 8:16 ` Alan Cox
2011-07-06 1:49 ` Nathan Royer
2011-07-06 9:07 ` Jonathan Cameron
2011-07-06 20:25 ` Nathan Royer
2011-07-06 10:54 ` Alan Cox
2011-07-06 21:27 ` Nathan Royer
2011-07-07 7:40 ` Alan Cox
2011-07-08 1:25 ` Nathan Royer
2011-07-08 11:21 ` Jonathan Cameron
2011-07-08 16:24 ` Nathan Royer
2011-07-04 20:06 ` Eric Andersson
2011-07-01 21:04 ` Arnd Bergmann
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=4E0D8CA8.5040208@cam.ac.uk \
--to=jic23@cam.ac.uk \
--cc=akpm@linux-foundation.org \
--cc=alan@linux.intel.com \
--cc=dmitry.torokhov@gmail.com \
--cc=gregkh@suse.de \
--cc=jkosina@suse.cz \
--cc=khali@linux-fr.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nroyer@invensense.com \
/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
all inboxes | Powered by JetHome®