lkml.org 
[lkml]   [2006]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC] Apple Motion Sensor driver
Date
On Monday 03 July 2006 07:31, Stelian Pop wrote:
> Le lundi 03 juillet 2006 à 20:49 +1000, Benjamin Herrenschmidt a écrit :
> > On Mon, 2006-07-03 at 12:45 +0200, 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 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.
> > >
> > > Do you think I should rewrite the ams_sensors function to only get the
> > > correct value?
> >
> > Cache the values and only re-read from the hardware after a given amount
> > of time has elapsed ?
>
> Seems to be a good idea indeed.
>

But what is the purpose of that attribute anyway? I'd just drop it completely.

--
Dmitry
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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