linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Gao Pandy <gaopan-KZfg59tc24xl57MIdRCFDg@public.gmane.org>,
	"wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org"
	<wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
	"linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Li Frank <Frank.Li-KZfg59tc24xl57MIdRCFDg@public.gmane.org>,
	Duan Andy <fugang.duan-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Subject: Re: [Patch v2] i2c: imx: implement bus recovery
Date: Tue, 8 Sep 2015 22:22:58 +0200	[thread overview]
Message-ID: <20150908202258.GY14598@pengutronix.de> (raw)
In-Reply-To: <CACRpkdaRu0jLJUddpjVvO9cBCRfHJpzAm0K1v825dCiSy0Zweg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Hello,

On Tue, Sep 08, 2015 at 04:18:41PM +0200, Linus Walleij wrote:
> On Mon, Sep 7, 2015 at 10:00 AM, Uwe Kleine-König
> <u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> wrote:
> > [Me]
> 
> >> If the use case is around the i2c traffic, it is a mode related to I2C,
> >> and if this mode is called "GPIO mode" in the data sheet
> >> is irrelevant, because it is obviously not used for the generic
> >> input/output but the specific I2C. The terminology should be
> >> made familiar to whoever needs to go in and read the code later.
> >
> > The background info that was obviously missing from the part of the
> > thread I sent to you is that pinctrl_pm_select_sleep_state is used to
> > prepare bitbanging on the i2c bus to do bus recovery. (The controller
> > doesn't implement this, so we have to resort to manually drive the
> > pins.)
> 
> I don't understand. What does "manually" mean in this context?
> Code examples for "manual" and "automatic"?

Normally i2c operations are done using the i2c core in the SoC and using
the i2c function of the respective pins. Recovery
however must be done (manually) by configuring the lines as GPIO and
using a sequence of calls to gpio_[gs]et_value.

The sleep state of the i2c bus device (usually?) configures the i2c
lines as GPIO. Is it ok to (ab)use the sleep state to prepare for the
recovery procedure or should we better introduce a dedicated gpio mode
pinctrl?

Best regards
Uwe

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

  parent reply	other threads:[~2015-09-08 20:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-17  2:36 [Patch v2] i2c: imx: implement bus recovery Gao Pan
     [not found] ` <1437100605-28047-1-git-send-email-b54642-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2015-08-13  5:51   ` Gao Pandy
2015-08-13  8:15   ` Uwe Kleine-König
     [not found]     ` <20150813081528.GA9999-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-08-19  3:44       ` Gao Pandy
     [not found]         ` <CY1PR0301MB0858E4EEEC54C81BC4E7A621CF670-YrwGdl+PljlUWoKpOwApjpwN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2015-08-19  7:02           ` Uwe Kleine-König
     [not found]             ` <20150819070218.GE9999-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-08-19  7:43               ` Gao Pandy
     [not found]                 ` <CY1PR0301MB0858A807E83F5B1665A99EB9CF670-YrwGdl+PljlUWoKpOwApjpwN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2015-08-19  7:52                   ` Uwe Kleine-König
2015-08-25 14:18               ` Linus Walleij
     [not found]                 ` <CACRpkdYy3xQ3N7199GcV83-HrgOERnffNLh=qak8K8hpcAHs1Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-07  8:00                   ` Uwe Kleine-König
     [not found]                     ` <20150907080032.GO9999-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-09-08 14:18                       ` Linus Walleij
     [not found]                         ` <CACRpkdaRu0jLJUddpjVvO9cBCRfHJpzAm0K1v825dCiSy0Zweg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-08 20:22                           ` Uwe Kleine-König [this message]
     [not found]                             ` <20150908202258.GY14598-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-09-09  8:46                               ` Linus Walleij

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=20150908202258.GY14598@pengutronix.de \
    --to=u.kleine-koenig-bicnvbalz9megne8c9+irq@public.gmane.org \
    --cc=Frank.Li-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    --cc=fugang.duan-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    --cc=gaopan-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    --cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=wsa-z923LK4zBo2bacvFa/9K2g@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 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).