All of lore.kernel.org
 help / color / mirror / Atom feed
From: linux-kernel@hansmi.ch (Michael Hanselmann)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] [PATCH] Apple Motion Sensor driver
Date: Fri, 04 Aug 2006 19:52:39 +0000	[thread overview]
Message-ID: <20060804195239.GA7982@hansmi.ch> (raw)
In-Reply-To: <20060802191520.GA2260@hansmi.ch>

On Fri, Aug 04, 2006 at 11:11:31AM -0300, Aristeu Sergio Rozanski Filho wrote:
> what about the attached patch?

>  	ams_i2c_write(AMS_COMMAND, cmd);
> -	for (i = 0; i < 10; i++) {
> -		mdelay(5);

This guarantees a minimum wait time of 5msec after writing the value.
Looking at the specs[1], this should be done. Your code doesn't do that:

> +	while (remaining) {
> +		remaining = schedule_timeout(remaining);
>  		result = ams_i2c_read(AMS_COMMAND);
>  		if (result = 0 || result & 0x80)
>  			return 0;

I'm not sure wether the 5msec delay is really required, but I would
insert it if it's in the specs.

So far, NACK until we got that right.

Next time, please insert the patch inline.

Thanks,
Michael

[1] http://johannes.sipsolutions.net/PowerBook/Apple_Motion_Sensor_Specification/#head-cc4be6b93ad9fcb8d373ad340b12891ed920a05f


  parent reply	other threads:[~2006-08-04 19:52 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-02 19:15 [lm-sensors] [PATCH] Apple Motion Sensor driver Michael Hanselmann
2006-08-03  2:11 ` Andrew Morton
2006-08-03  6:53 ` Michael Hanselmann
2006-08-03  7:26 ` Andrew Morton
2006-08-03  7:36 ` Andrew Morton
2006-08-03 19:49 ` Michael Hanselmann
2006-08-03 20:08 ` Aristeu Sergio Rozanski Filho
2006-08-04  8:13 ` Johannes Berg
2006-08-04  8:34 ` Johannes Berg
2006-08-04 14:11 ` Aristeu Sergio Rozanski Filho
2006-08-04 19:52 ` Michael Hanselmann [this message]
2006-08-04 20:39 ` Aristeu Sergio Rozanski Filho
2006-08-04 21:49 ` Michael Hanselmann
2006-08-04 22:19 ` Andrew Morton
2006-08-04 23:03 ` Michael Hanselmann
2006-08-05  7:26 ` Stelian Pop
2006-08-06 11:41 ` Johannes Berg
2006-08-06 14:38 ` Michael Hanselmann
2006-08-07  7:09 ` Johannes Berg
2006-08-07  8:02 ` Jean Delvare
2006-08-07  8:06 ` Johannes Berg
2006-08-07  9:28 ` Jean Delvare
2006-08-07  9:36 ` Johannes Berg
2006-08-09 10:07 ` Benjamin Herrenschmidt
2006-08-09 10:37 ` Benjamin Herrenschmidt
2006-08-09 12:17 ` Michael Hanselmann
2006-08-09 12:25 ` Johannes Berg
2006-08-09 12:39 ` Johannes Berg
2006-08-10 18:33 ` Michael Hanselmann

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=20060804195239.GA7982@hansmi.ch \
    --to=linux-kernel@hansmi.ch \
    --cc=lm-sensors@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.