linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: andrew may <acmay@acmay.homeip.net>
To: Kenneth Johansson <kenneth.johansson@inn.ericsson.se>
Cc: andrew may <acmay@acmay.homeip.net>,
	Linuxppc embedded <linuxppc-embedded@lists.linuxppc.org>,
	Armin Kuster <akuster@mvista.com>
Subject: Re: 405 I2C
Date: Wed, 22 May 2002 12:53:24 -0700	[thread overview]
Message-ID: <20020522125324.A23591@ecam.san.rr.com> (raw)
In-Reply-To: <1022063796.7265.74.camel@swb11>

[-- Attachment #1: Type: text/plain, Size: 1781 bytes --]

On Wed, May 22, 2002 at 12:36:36PM +0200, Kenneth Johansson wrote:
> On Tue, 2002-05-21 at 20:00, andrew may wrote:
>
> > well i2c...read_byte_data is really a write of 1 byte followed by a read
> > of 1 byte. The scan is just a read of 1 byte.
>
> Yepp thats the difference.
>
> >
> > So you should be going through the combined xfer function.
>
> Yes your right I missed that. It dose look like it's the first write
> that never get an ack. This is the debug output from a one byte read
> from address 0 from a non existing device.
>
> kernel: iic_xfer: iic_xfer: Clearing status register
> kernel: iic_xfer: Waiting for any pending transfers to complete
> kernel: iic_xfer: Clearing master data buffer
> kernel: iic_xfer: Loading slave address
> kernel: iic_xfer: Call combined transaction
> kernel: Beginning combined transaction
> kernel: This one is a write
> kernel: iic_sendbytes: Waiting for interrupt
> kernel: iic_ibmocp_handler: in interrupt handler
> kernel: iic_ibmocp_handler: status = 26
> kernel: i2c-algo-ppc405.o: fail: only wrote -1 bytes.
>
> It dose look like I actually have to learn how this is supposed to work
> we seem to have more than one problem with the current code :(

Here is a patch to my latest working copy. The comments describe the new
iic_xfer function. The stuff is in the #if 1 section and it is about 280 lines
and it replaces the #else section which is about 470 lines. So if you are going
to work on it I would suggest starting with the new iic_xfer rather than the one
that is there now.

You will need to remove the ibm_gpio_out_timer calls in the IRQ handler I used
to trigger stuff.

There is still plenty of things to do with this, but it is in a works for me state,
and I am not planning on spending time on this stuff right now.

[-- Attachment #2: i2c-522.patch.gz --]
[-- Type: application/octet-stream, Size: 5986 bytes --]

  reply	other threads:[~2002-05-22 19:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-21 15:30 405 I2C Kenneth Johansson
2002-05-21 15:59 ` andrew may
2002-05-21 16:16   ` Kenneth Johansson
2002-05-21 18:00     ` andrew may
2002-05-22 10:36       ` Kenneth Johansson
2002-05-22 19:53         ` andrew may [this message]
2002-05-21 16:07 ` Armin Kuster
2002-05-21 17:27   ` andrew may

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=20020522125324.A23591@ecam.san.rr.com \
    --to=acmay@acmay.homeip.net \
    --cc=akuster@mvista.com \
    --cc=kenneth.johansson@inn.ericsson.se \
    --cc=linuxppc-embedded@lists.linuxppc.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;
as well as URLs for NNTP newsgroup(s).