public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor@insightbb.com>
To: Stelian Pop <stelian@popies.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Michael Hanselmann <linux-kernel@hansmi.ch>,
	linux-kernel@vger.kernel.org, lm-sensors@lm-sensors.org,
	khali@linux-fr.org, linux-kernel@killerfox.forkbomb.ch,
	johannes@sipsolutions.net, chainsaw@gentoo.org
Subject: Re: [RFC] Apple Motion Sensor driver
Date: Mon, 3 Jul 2006 09:16:36 -0400	[thread overview]
Message-ID: <200607030916.37896.dtor@insightbb.com> (raw)
In-Reply-To: <1151926278.10711.25.camel@localhost.localdomain>

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

  reply	other threads:[~2006-07-03 13:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-02 22:26 [RFC] Apple Motion Sensor driver Michael Hanselmann
2006-07-03  2:33 ` Dmitry Torokhov
2006-07-03  3:14 ` Andrew Morton
2006-07-03  3:47   ` Benjamin Herrenschmidt
2006-07-03  4:00     ` Andrew Morton
2006-07-03  6:56   ` Michael Hanselmann
2006-07-03  9:02     ` Stelian Pop
2006-07-03  7:29 ` Jean Delvare
2006-07-03  8:52   ` Benjamin Herrenschmidt
2006-07-03 10:12 ` Stelian Pop
2006-07-03 10:19   ` Johannes Berg
2006-07-03 10:45   ` Michael Hanselmann
2006-07-03 10:49     ` Benjamin Herrenschmidt
2006-07-03 11:31       ` Stelian Pop
2006-07-03 13:16         ` Dmitry Torokhov [this message]
2006-07-03 13:25     ` Stefan Richter
2006-07-03 13:44 ` Dmitry Torokhov
2006-07-03 22:45 ` Michael Hanselmann
2006-07-04 16:45   ` Michael Buesch

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=200607030916.37896.dtor@insightbb.com \
    --to=dtor@insightbb.com \
    --cc=benh@kernel.crashing.org \
    --cc=chainsaw@gentoo.org \
    --cc=johannes@sipsolutions.net \
    --cc=khali@linux-fr.org \
    --cc=linux-kernel@hansmi.ch \
    --cc=linux-kernel@killerfox.forkbomb.ch \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.org \
    --cc=stelian@popies.net \
    /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