From: Jonathan Cameron <jic23@cam.ac.uk>
To: Arnd Bergmann <arnd@arndb.de>, Andi <andi.shyti@gmail.com>
Cc: "AnilKumar, Chimata" <anilkumar@ti.com>,
"greg@kroah.com" <greg@kroah.com>,
"eric.piel@tremplin-utc.net" <eric.piel@tremplin-utc.net>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"broonie@opensource.wolfsonmicro.com"
<broonie@opensource.wolfsonmicro.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"Nori, Sekhar" <nsekhar@ti.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
lm-sensors@lm-sensors.org, linux-input@vger.kernel.org,
Jean Delvare <khali@linux-fr.org>
Subject: Re: [PATCH] lis3lv02d: Add STMicroelectronics lis33ldlh digital
Date: Thu, 19 Jan 2012 17:15:10 +0000 [thread overview]
Message-ID: <b5adb97c-8b5a-43ed-a750-cf5c5b6adb0c@email.android.com> (raw)
In-Reply-To: <201201191426.45923.arnd@arndb.de>
Arnd Bergmann <arnd@arndb.de> wrote:
>On Wednesday 18 January 2012, Andi wrote:
>> What do you mean with "kernel-wide policy for accelerometer drivers"?
>> As far as I know, accelerometer drivers are written between the i2c
>driver and the
>> input driver.
>> The input driver provides already some accelerometer specific event
>types, ABS_X, ABS_Y, ABS_Z,
>> in your opinion isn't it enough?
>> If you mean something like collecting common properties like g range
>or frequency or whatever in a
>> standard interface, then I think that accelerometers are quite
>different as devices and sometimes
>> it could be difficult to arrange a common interface.
>
>The problem is that we have some drivers using the input subsystem,
>some
>drivers using the iio subsystem and some drivers using none of these
>but
>interfacing with user space using some homegrown method, see my list:
>
>> > $ git grep -l accelerometer drivers/ | manual_grep
>> > drivers/hwmon/applesmc.c
>> > (one hwmon sysfs attribute for x/y/z)
>> > drivers/input/misc/adxl34x.c
>> > (lots of sysfs attributes, input_report_key)
>> > drivers/input/misc/cma3000_d0x.c
>> > (input_report_abs)
>> > drivers/input/misc/kxtj9.c
>> > (input_report_abs, plus one aux sysfs attribute)
>> > drivers/macintosh/ams/ams-core.c
>> > (one sysfs attribute for x/y/z)
>> > drivers/misc/lis3lv02d/
>> > (multiple sysfs attributes)
>> > drivers/platform/x86/hdaps.c
>> > (multiple sysfs attributes, only x/y)
>> > drivers/platform/x86/hp_accel.c
>> > (hooks into drivers/misc/lis3lv02d/)
>> > drivers/staging/iio/accel/kxsd9.c
>> > (iio)
>> > drivers/staging/iio/accel/sca3000_core.c
>> > (iio plus extra attributes)
>
>If all drivers were using the input subsystem in the way you describe,
>that would be a good solution, but right now the majority of the
>drivers don't do this.
Also worth noting that there are numerous devices that are completely inappropriate for human input. Take specialised impact and vibration accelerometers. Very high speed sampling for short time periods. I agree that your bog standard 3 axis sub 10 g accelerometer belongs in input. The kxsd9 and lis3lo2dq in iio are there for historical reasons and because they are very handy for testing our bridging to input. That said it should ultimately make very little difference to user space if they are accessing a true input device or a iio device via an input bridge. I also think that actually there is very little in the way of unusual controls for accelerometers particularly those designed for human input. Not standardizing gain or sampling frequency control is lazy. Even filtering and fft contr
ols can and should be standardised. Doing that is a large part of what iio is about.
>
> Arnd
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
prev parent reply other threads:[~2012-01-19 17:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1324617892-14576-1-git-send-email-anilkumar@ti.com>
[not found] ` <331ABD5ECB02734CA317220B2BBEABC13177CDA4@DBDE01.ent.ti.com>
2012-01-18 14:03 ` [PATCH] lis3lv02d: Add STMicroelectronics lis33ldlh digital Arnd Bergmann
2012-01-18 14:43 ` Jean Delvare
2012-01-18 14:49 ` Arnd Bergmann
2012-01-18 15:00 ` Jean Delvare
2012-01-18 16:47 ` Jonathan Cameron
2012-01-18 17:11 ` Arnd Bergmann
2012-01-19 5:30 ` AnilKumar, Chimata
2012-01-19 17:10 ` Arnd Bergmann
2012-01-19 17:29 ` Mark Brown
2012-07-25 8:57 ` AnilKumar, Chimata
2012-01-18 21:36 ` Andi
2012-01-19 14:26 ` Arnd Bergmann
2012-01-19 17:15 ` Jonathan Cameron [this message]
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=b5adb97c-8b5a-43ed-a750-cf5c5b6adb0c@email.android.com \
--to=jic23@cam.ac.uk \
--cc=akpm@linux-foundation.org \
--cc=andi.shyti@gmail.com \
--cc=anilkumar@ti.com \
--cc=arnd@arndb.de \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=dmitry.torokhov@gmail.com \
--cc=eric.piel@tremplin-utc.net \
--cc=greg@kroah.com \
--cc=khali@linux-fr.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=lm-sensors@lm-sensors.org \
--cc=nsekhar@ti.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;
as well as URLs for NNTP newsgroup(s).