Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: Manuel Lauss <mano@roarinelk.homelinux.net>
Cc: i2c@lm-sensors.org, linux-mips@linux-mips.org,
	Domen Puncer <domen.puncer@ultra.si>
Subject: Re: [PATCH 1/2] i2c-au1550: send i2c stop on error #2
Date: Wed, 16 May 2007 20:20:01 +0200	[thread overview]
Message-ID: <20070516202001.7a7b2451@hyperion.delvare> (raw)
In-Reply-To: <20070516142038.GA15418@roarinelk.homelinux.net>

On Wed, 16 May 2007 16:20:38 +0200, Manuel Lauss wrote:
> > 2* In i2c_write and i2c_read, the stop bit is always sent together with
> > the last byte, while your new code sends the stop bit on its own after
> > the address byte. Is it OK? 
> 
> Well, no. However the quick probe does an i2c read IIRC so it should be
> safe. I'll fix that too.

From an I2C perspective, zero-byte transactions can be both reads and
writes. So if you accidentally send one more byte on the bus after the
address, you are actually doing a 1-byte read or write. The variant
used by the Linux kernel for probing purposes is the "write" variant.

> >                             I am wondering if your code isn't sending
> > an extra (0) byte after the address when asked to send a zero-byte
> > message. That would be bad. Do you have a bus analyzer or scope to
> > check what exactly is being sent on the bus in this case?
> 
> Yes I have a scope. I'll improve the driver some more and then check
> the actual data sent over the wires.

OK, thanks. I have to admit I am a bit curious how (if) you can send a
stop transaction on error without sending an extra byte with this chip.

-- 
Jean Delvare

WARNING: multiple messages have this Message-ID (diff)
From: Jean Delvare <khali@linux-fr.org>
To: Manuel Lauss <mano@roarinelk.homelinux.net>
Cc: i2c@lm-sensors.org, linux-mips@linux-mips.org,
	Domen Puncer <domen.puncer@ultra.si>
Subject: Re: [PATCH 1/2] i2c-au1550: send i2c stop on error #2
Date: Wed, 16 May 2007 20:20:01 +0200	[thread overview]
Message-ID: <20070516202001.7a7b2451@hyperion.delvare> (raw)
Message-ID: <20070516182001.PW6fK5VA0kMX1TbVNUkTcrj6yw4-XOlY3GsRd38alUU@z> (raw)
In-Reply-To: <20070516142038.GA15418@roarinelk.homelinux.net>

On Wed, 16 May 2007 16:20:38 +0200, Manuel Lauss wrote:
> > 2* In i2c_write and i2c_read, the stop bit is always sent together with
> > the last byte, while your new code sends the stop bit on its own after
> > the address byte. Is it OK? 
> 
> Well, no. However the quick probe does an i2c read IIRC so it should be
> safe. I'll fix that too.

  reply	other threads:[~2007-05-16 18:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-16  5:31 [PATCH 1/2] i2c-au1550: send i2c stop on error #2 Manuel Lauss
2007-05-16 13:38 ` Jean Delvare
2007-05-16 14:20   ` Manuel Lauss
2007-05-16 18:20     ` Jean Delvare [this message]
2007-05-16 18:20       ` 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=20070516202001.7a7b2451@hyperion.delvare \
    --to=khali@linux-fr.org \
    --cc=domen.puncer@ultra.si \
    --cc=i2c@lm-sensors.org \
    --cc=linux-mips@linux-mips.org \
    --cc=mano@roarinelk.homelinux.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