linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Eugene Surovegin <ebs@ebshome.net>
To: Randy Vinson <rvinson@mvista.com>
Cc: Greg KH <greg@kroah.com>,
	sensors@stimpy.netroedge.com, linuxppc-embedded@ozlabs.org
Subject: Re: [PATCH 1/2] Add support for Maxim/Dallas DS1374 Real-Time Clock Chip
Date: Fri, 3 Jun 2005 14:46:54 -0700	[thread overview]
Message-ID: <20050603214653.GA15314@gate.ebshome.net> (raw)
In-Reply-To: <42A0CD46.60300@mvista.com>

On Fri, Jun 03, 2005 at 02:36:06PM -0700, Randy Vinson wrote:
> Greetings,
>  I've put together a small I2C client for the Maxim/Dallas DS1374 RTC
> chip and tested it on a Freescale MPC8349ADS board that uses the chip.
> The attached patch adds support for the chip itself and a follow-up patch
> will add support to the Freescale board.

[snip]

> +	down(&ds1374_mutex);
> +
> +	/*
> +	 * Since the reads are being performed one byte at a time using
> +	 * the SMBus vs a 4-byte i2c transfer, there is a chance that a
> +	 * carry will occur during the read. To detect this, 2 reads are
> +	 * performed and compared.
> +	 */
> +	do {
> +		t1 = ds1374_read_rtc();
> +		t2 = ds1374_read_rtc();
> +	} while (t1 != t2 && limit--);

I wonder, why you chose to use those 1-byte SMBus transfers instead of 
i2c transfer.

I wrote similar DS1374 driver some time ago which used those transfers 
and they worked just fine.

-- 
Eugene

  parent reply	other threads:[~2005-06-03 21:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-03 21:36 [PATCH 1/2] Add support for Maxim/Dallas DS1374 Real-Time Clock Chip Randy Vinson
2005-06-03 21:41 ` Kumar Gala
2005-06-03 22:05   ` Randy Vinson
2005-06-03 21:43 ` [PATCH 2/2] " Randy Vinson
2005-06-03 21:46 ` Eugene Surovegin [this message]
2005-06-03 22:17   ` [PATCH 1/2] " Randy Vinson
2005-06-09 17:25     ` [lm-sensors] " Jean Delvare
2005-06-09 19:06       ` Mark A. Greer
2005-06-09 19:29         ` Jean Delvare
2005-06-09 18:21 ` [lm-sensors] " Jean Delvare

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=20050603214653.GA15314@gate.ebshome.net \
    --to=ebs@ebshome.net \
    --cc=greg@kroah.com \
    --cc=linuxppc-embedded@ozlabs.org \
    --cc=rvinson@mvista.com \
    --cc=sensors@stimpy.netroedge.com \
    /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;
as well as URLs for NNTP newsgroup(s).