mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <guenter.roeck@ericsson.com>
To: Tabi Timur-B04825 <B04825@freescale.com>
Cc: Jean Delvare <khali@linux-fr.org>,
	Ben Dooks <ben-linux@fluff.org>,
	Grant Likely <grant.likely@secretlab.ca>,
	"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Tang Yuantian-B29983 <B29983@freescale.com>
Subject: Re: [PATCH] i2c/busses: (mpc) Add support for SMBUS_READ_BLOCK_DATA
Date: Tue, 15 Nov 2011 11:14:47 -0800	[thread overview]
Message-ID: <1321384487.2309.363.camel@groeck-laptop> (raw)
In-Reply-To: <CAOZdJXVq=0pbrPM_-+Kjf3NhON8oN3Me64R6c9qBiAEFuRsDOw@mail.gmail.com>

On Tue, 2011-11-15 at 14:02 -0500, Tabi Timur-B04825 wrote:
> On Tue, Nov 15, 2011 at 2:54 AM, Jean Delvare <khali@linux-fr.org> wrote:
> 
> > This needs careful testing (which I can't do.)
> 
> I can test these patches, so please CC me on them.
> 
Ok, I'll copy you on the next version of the patch. Turns out I have a
board as well, so I can at least do some basic testing.

> > There may have been a
> > reason why the read was done after the writes. Swapping the commands
> > may be the wrong thing to do. The dummy read earlier in this function
> > suggests that maybe changes to CCR do not take effect until you read
> > from (or write to) the DR register.
> 
> Unfortunately, I don't know enough about the I2C protocol to answer
> this, but I can provide this description on the DR register from the
> reference manual:
> 
>          Transmission starts when an address and the R/W bit are
> written to the data register and the I2C interface
>          performs as the master. A data transfer is initiated when
> data is written to the I2CDR. The most significant bit
>          is sent first in both cases. In master receive mode, reading
> the data register allows the read to occur, but also
>          allows the I2C module to receive the next byte of data on the
> I2C interface. In slave mode, the same function
>          is available after it is addressed. Note that in both master
> receive and slave receive modes, the very first read
>          is always a dummy read.
> 
> > Can't the above be rewritten to keep the order of the commands as it
> > was before? AFAICS it would only take one or two extra tests.
> 
> I think it's very important to keep the order as-is, if at all
> possible.  This driver is very old and the hardware is used on all of
> our SOCs, dating back several years.  It would be a nightmare to test
> it all over again.
> 
I'll see if I can work around that. 1-byte block reads may be tricky,
though, but maybe I can get that working as well.

Thanks,
Guenter



  reply	other threads:[~2011-11-15 19:16 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-15  6:27 Guenter Roeck
2011-11-15  8:54 ` Jean Delvare
2011-11-15 16:29   ` Guenter Roeck
2011-11-15 19:02   ` Tabi Timur-B04825
2011-11-15 19:14     ` Guenter Roeck [this message]
2011-11-15 20:05       ` Jean Delvare
2011-11-15 21:14         ` Guenter Roeck
     [not found] ` <CAOZdJXUPO5PyMkAw-2EPvy_qSUuqsgUA7Gr8mKUX7HyShoXk3g@mail.gmail.com>
     [not found]   ` <E6AF40B3BFC8A9428EACB47497F0F4B62DC687@039-SN1MPN1-002.039d.mgd.msft.net>
     [not found]     ` <ECEE0D23-8F53-402C-A97F-4DB0F0E9C79B@freescale.com>
2011-11-16 17:28       ` York Sun
2011-11-16 17:36         ` Guenter Roeck
2011-11-16 17:55           ` York Sun
2011-11-16 18:09             ` Guenter Roeck
2011-11-16 18:09             ` Jean Delvare
2011-11-16 18:20               ` York Sun
2011-11-16 18:51                 ` Guenter Roeck
2011-11-16 18:56                   ` Timur Tabi
2011-11-16 18:58                   ` sun york-R58495
2011-11-16 19:10                 ` Jean Delvare
2011-11-16 19:15                   ` York Sun
2011-11-16 19:18                     ` Jean Delvare
2011-11-16 19:24                       ` York Sun
2011-11-17 18:18                         ` Guenter Roeck
2011-11-17 19:23                           ` York Sun
2011-11-18  3:15                           ` Tang Yuantian-B29983
2011-12-01  7:06                       ` Tang Yuantian-B29983
2011-12-07  2:52                       ` Tang Yuantian-B29983
2011-12-07  3:20                         ` Guenter Roeck
2011-12-07  5:25                           ` Tang Yuantian-B29983
2011-12-07  7:29                             ` Jean Delvare
2012-02-23  6:57                               ` Huang Changming-R66093
2011-11-16 17:38         ` Jean Delvare
2011-12-12  4:10 Yuantian.tang
2011-12-12  9:28 ` Guenter Roeck

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=1321384487.2309.363.camel@groeck-laptop \
    --to=guenter.roeck@ericsson.com \
    --cc=B04825@freescale.com \
    --cc=B29983@freescale.com \
    --cc=ben-linux@fluff.org \
    --cc=grant.likely@secretlab.ca \
    --cc=khali@linux-fr.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®