lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b5adb97c-8b5a-43ed-a750-cf5c5b6adb0c@email.android.com>
Date:	Thu, 19 Jan 2012 17:15:10 +0000
From:	Jonathan Cameron <jic23@....ac.uk>
To:	Arnd Bergmann <arnd@...db.de>, Andi <andi.shyti@...il.com>
CC:	"AnilKumar, Chimata" <anilkumar@...com>,
	"greg@...ah.com" <greg@...ah.com>,
	"eric.piel@...mplin-utc.net" <eric.piel@...mplin-utc.net>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"broonie@...nsource.wolfsonmicro.com" 
	<broonie@...nsource.wolfsonmicro.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
	"Nori, Sekhar" <nsekhar@...com>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	lm-sensors@...sensors.org, linux-input@...r.kernel.org,
	Jean Delvare <khali@...ux-fr.org>
Subject: Re: [PATCH] lis3lv02d: Add STMicroelectronics lis33ldlh digital



Arnd Bergmann <arnd@...db.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 controls 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ