[lkml]   [2006]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC] Apple Motion Sensor driver
Michael Hanselmann wrote:
> On Mon, Jul 03, 2006 at 12:12:47PM +0200, Stelian Pop wrote:
>> > +
>> > +static DEVICE_ATTR(mouse, S_IRUGO | S_IWUSR,
>> > + ams_mouse_show_mouse, ams_mouse_store_mouse);

[I think the following discussion is about ams_show_xyz, not

>> I would prefer three different files for x, y and z instead of a single
>> one...
> Because of the way the values are calculated with orientation, that
> would mean that if a program needs all three, either all values are read
> three times or the ams_sensors function gets much more complicated.
> To prevent it from having to read them three times in a row, I joined
> all three values.

I don't know what a software will be doing with it, but "displacement"
(and its time derivatives "velocity", "acceleration", "jerk") is a
vector. Why not write the component-wise representation of the vector
into a single sysfs attribute? Especially if this keeps the kernel code
simple and small. I suppose even userspace code which evaluates the
attribute is in many cases simpler (and more precise anyway) if only a
single attribute is used.
Stefan Richter
-=====-=-==- -==- ===--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-07-03 15:31    [W:0.060 / U:0.056 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site