mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Johannes Stezenbach <js@sig21.net>
Cc: barebox@lists.infradead.org, kernel@pengutronix.de
Subject: Re: [PATCH] [RFC] i2c-imx: send a soft bus reset during probe
Date: Fri, 28 Sep 2012 12:10:09 +0200	[thread overview]
Message-ID: <20120928101009.GD16606@pengutronix.de> (raw)
In-Reply-To: <20120927103323.GA14329@sig21.net>

Hi Johannes,

On Thu, Sep 27, 2012 at 12:33:23PM +0200, Johannes Stezenbach wrote:
> On Thu, Sep 27, 2012 at 11:53:12AM +0200, Sascha Hauer wrote:
> > On Thu, Sep 27, 2012 at 12:56:46AM +0200, Uwe Kleine-König wrote:
> > > 
> > >         2-WIRE SOFTWARE RESET: After an interruption in protocol, power loss or
> > >         system reset, any 2-wire part can be reset by following these steps:
> > >         (a) Create a start bit condition,
> > >         (b) Clock 9 cycles,
> > >         (c) Create another start bit followed by a stop bit condition as
> > >             shown below. The device is ready for the next communication
> > >             after the above steps have been completed.
> > > 
> > >         SCL /¯\_/¯\_/¯\_/¯\_/¯\_/¯\_/¯\_/¯\_/¯\_/¯\_/¯\_/¯\
> > >         SDA ¯\_/¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\___/¯
> > >              S   1   2   3   4   5   6   7   8   9   Sr  P
> > > 
> > 
> > Sounds good. We often have this problem.
> > 
> > I wonder if it's worth to have this as a general callback in the i2c
> > layer.
> 
> I wonder how this relates to the SW reset and Bus Clear
> procedures from the I2C spec?
> http://www.nxp.com/documents/user_manual/UM10204.pdf
Software reset seems to start with sending address 0 (general call
address) and not being supported by all devices. Bus Clear is roughly
what I implemented. As I understand it the I2C-bus specification doesn't
put the S, Sr and P around the clock.

> I think the above is not a SW reset, essentially it
> sends 9 clocks to make the slave release SDA and then
> it sends a STOP to get the bus into an idle state.
... depends on the definition of SW reset. It's definitily not the same
thing as in the I2C-bus spec. So choosing a different name would be
good.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2012-09-28 10:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-26 22:56 Uwe Kleine-König
2012-09-27  9:53 ` Sascha Hauer
2012-09-27 10:33   ` Johannes Stezenbach
2012-09-28 10:10     ` Uwe Kleine-König [this message]
2012-09-27 11:02   ` Wolfram Sang
2012-09-28 14:19   ` Uwe Kleine-König

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=20120928101009.GD16606@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=js@sig21.net \
    --cc=kernel@pengutronix.de \
    /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