All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Carpenter <paul-YHLC2tV1sDlxR4N9A70vTlRxknfHcPLb9dF7HbQ/qKg@public.gmane.org>
To: Viresh Kumar <viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
	u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
	khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org,
	ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	spear-devel-nkJGhpqTU55BDgjK7y7TUQ@public.gmane.org
Subject: Re: [PATCH V7 1/2] i2c/adapter: Add bus recovery infrastructure
Date: Mon, 26 Nov 2012 13:28:22 +0000	[thread overview]
Message-ID: <50B36E76.6010008@pcserviceselectronics.co.uk> (raw)
In-Reply-To: <CAKohpomNTKFJQCrZdC81OiQpjdtK85XXWfvvB=XYb85e49OBZA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Viresh Kumar wrote:
> On 26 November 2012 17:15, Paul Carpenter
> <paul-YHLC2tV1sDlxR4N9A70vTlRxknfHcPLb9dF7HbQ/qKg@public.gmane.org> wrote:
>> Unless you know why the bus is stuck, how can you reset reminder this
>> method ONLY works if SCL is high and SDA probably was low and the slave
....

> Hi Paul,
> 
> I completely agree with what you said, and i also feel the need of it now.
> We don't have a solution for SCL stuck low, just by playing with pad values.
> And need some sort of reset of device, etc as mentioned by you earlier.
> 
> What we can do here, is check SCL's value and give an error message for
> SCL stuck low + return error.

Yes best method error to mean  "SCL stuck low or long clock stretch"

> The short circuit mentioned earlier will not happen in our case as we
> are setting gpio flags as OPEN_DRAIN and so we would never be writing
> 1 on SCL pad.

 From an earlier thread comment

 >> +    ret = gpio_request_one(bri->scl_gpio, GPIOF_OPEN_DRAIN |
 >> +            GPIOF_OUT_INIT_HIGH, "i2c-scl");
 >
 >I always get wary of people driving I2C with non-open-drain, especially
 >with stuck busses

I would want to know what "GPIOF_OUT_INIT_HIGH" did as that is
suspiciously driving output high at startup.


-- 
Paul Carpenter          | paul-YHLC2tV1sDlxR4N9A70vTlRxknfHcPLb9dF7HbQ/qKg@public.gmane.org
<http://www.pcserviceselectronics.co.uk/>    PC Services
<http://www.pcserviceselectronics.co.uk/fonts/> Timing Diagram Font
<http://www.gnuh8.org.uk/>  GNU H8 - compiler & Renesas H8/H8S/H8 Tiny
<http://www.badweb.org.uk/> For those web sites you hate

  parent reply	other threads:[~2012-11-26 13:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-25  6:31 [PATCH V7 1/2] i2c/adapter: Add bus recovery infrastructure Viresh Kumar
     [not found] ` <71e27515a050a2c7d18272b84ff7ec3ec8b11cae.1353824555.git.viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-11-25  6:31   ` [PATCH V7 2/2] i2c/designware: Provide i2c bus recovery support Viresh Kumar
2012-11-25 11:52   ` [PATCH V7 1/2] i2c/adapter: Add bus recovery infrastructure Paul Carpenter
     [not found]     ` <50B20670.5070509-YHLC2tV1sDlxR4N9A70vTlRxknfHcPLb9dF7HbQ/qKg@public.gmane.org>
2012-11-26  2:28       ` Viresh Kumar
     [not found]         ` <CAKohpo=_2xwj+NCpZPB1EsWiGPLafc3XKVbRT+690AkHB76AWw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-26 11:45           ` Paul Carpenter
     [not found]             ` <50B35642.7030104-YHLC2tV1sDlxR4N9A70vTlRxknfHcPLb9dF7HbQ/qKg@public.gmane.org>
2012-11-26 12:51               ` Viresh Kumar
     [not found]                 ` <CAKohpomNTKFJQCrZdC81OiQpjdtK85XXWfvvB=XYb85e49OBZA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-26 13:28                   ` Paul Carpenter [this message]
     [not found]                     ` <50B36E76.6010008-YHLC2tV1sDlxR4N9A70vTlRxknfHcPLb9dF7HbQ/qKg@public.gmane.org>
2012-11-26 14:51                       ` Viresh Kumar
2012-11-26 20:20                   ` Uwe Kleine-König
     [not found]                     ` <20121126202003.GA3384-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-11-26 23:00                       ` Paul Carpenter
2012-11-27  5:49                       ` Viresh Kumar
     [not found]                         ` <CAKohpokgcvaSHNDoN2epnsxSmpKJ6GaWph0EW+rrkCfXjBrUyA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-30 14:05                           ` Wolfram Sang

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=50B36E76.6010008@pcserviceselectronics.co.uk \
    --to=paul-yhlc2tv1sdlxr4n9a70vtlrxknfhcplb9df7hbq/qkg@public.gmane.org \
    --cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
    --cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=spear-devel-nkJGhpqTU55BDgjK7y7TUQ@public.gmane.org \
    --cc=u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.