All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Kamel Bouhara <kamel.bouhara@bootlin.com>
Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Ludovic Desroches <ludovic.desroches@microchip.com>,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH 2/4] i2c: at91: implement i2c bus recovery
Date: Mon, 21 Oct 2019 22:20:44 +0200	[thread overview]
Message-ID: <20191021202044.GB3607@kunai> (raw)
In-Reply-To: <20191002144658.7718-3-kamel.bouhara@bootlin.com>

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

On Wed, Oct 02, 2019 at 04:46:56PM +0200, Kamel Bouhara wrote:
> Implement i2c bus recovery when slaves devices might hold SDA low.
> In this case re-assign SCL/SDA to gpios and issue 9 dummy clock pulses
> until the slave release SDA.
> 
> Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>

Setting up the bus_recovery looks OK. However, I don't see any call to
i2c_recover_bus(), so the bus_recovery is never used. Did you test this
and see an effect?

Also, I think we should merge this patch "[PATCH v3] i2c: at91: Send bus
clear command if SCL or SDA is down" into this series. The crucial thing
for both is when to apply the recovery (at the beginning of a
transfer!). The rest is "just" that some HW needs a bus_recovery_info
for pinctrl/GPIO handling (from this patch), while other HW needs a
bus_recovery_info with a custom recover_bus callback.

Opinions?


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Wolfram Sang <wsa@the-dreams.de>
To: Kamel Bouhara <kamel.bouhara@bootlin.com>
Cc: devicetree@vger.kernel.org,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	linux-kernel@vger.kernel.org,
	Ludovic Desroches <ludovic.desroches@microchip.com>,
	linux-i2c@vger.kernel.org,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/4] i2c: at91: implement i2c bus recovery
Date: Mon, 21 Oct 2019 22:20:44 +0200	[thread overview]
Message-ID: <20191021202044.GB3607@kunai> (raw)
In-Reply-To: <20191002144658.7718-3-kamel.bouhara@bootlin.com>


[-- Attachment #1.1: Type: text/plain, Size: 894 bytes --]

On Wed, Oct 02, 2019 at 04:46:56PM +0200, Kamel Bouhara wrote:
> Implement i2c bus recovery when slaves devices might hold SDA low.
> In this case re-assign SCL/SDA to gpios and issue 9 dummy clock pulses
> until the slave release SDA.
> 
> Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>

Setting up the bus_recovery looks OK. However, I don't see any call to
i2c_recover_bus(), so the bus_recovery is never used. Did you test this
and see an effect?

Also, I think we should merge this patch "[PATCH v3] i2c: at91: Send bus
clear command if SCL or SDA is down" into this series. The crucial thing
for both is when to apply the recovery (at the beginning of a
transfer!). The rest is "just" that some HW needs a bus_recovery_info
for pinctrl/GPIO handling (from this patch), while other HW needs a
bus_recovery_info with a custom recover_bus callback.

Opinions?


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2019-10-21 20:20 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-02 14:46 [PATCH 0/4] i2c bus recovery for Microchip SoCs Kamel Bouhara
2019-10-02 14:46 ` Kamel Bouhara
2019-10-02 14:46 ` [PATCH 1/4] dt-bindings: i2c: at91: document optional bus recovery properties Kamel Bouhara
2019-10-02 14:46   ` Kamel Bouhara
2019-10-02 14:46 ` [PATCH 2/4] i2c: at91: implement i2c bus recovery Kamel Bouhara
2019-10-02 14:46   ` Kamel Bouhara
2019-10-04  9:35   ` Claudiu.Beznea
2019-10-04  9:35     ` Claudiu.Beznea
2019-10-04  9:35     ` Claudiu.Beznea
2019-10-04 20:39     ` Uwe Kleine-König
2019-10-04 20:39       ` Uwe Kleine-König
2019-10-07 10:17       ` Claudiu.Beznea
2019-10-07 10:17         ` Claudiu.Beznea
2019-10-07 10:17         ` Claudiu.Beznea
2019-10-09 13:55   ` Ludovic Desroches
2019-10-09 13:55     ` Ludovic Desroches
2019-10-09 13:55     ` Ludovic Desroches
2019-10-09 14:01     ` Alexandre Belloni
2019-10-09 14:01       ` Alexandre Belloni
2019-10-10  6:54       ` Ludovic Desroches
2019-10-10  6:54         ` Ludovic Desroches
2019-10-10  6:54         ` Ludovic Desroches
2019-10-24 12:29         ` Kamel Bouhara
2019-10-25  7:04           ` Ludovic.Desroches
2019-10-21 20:20   ` Wolfram Sang [this message]
2019-10-21 20:20     ` Wolfram Sang
2019-10-22  7:59     ` Kamel Bouhara
2019-10-24 14:08       ` Codrin.Ciubotariu
2019-10-24 14:08         ` Codrin.Ciubotariu
2019-10-24 14:08         ` Codrin.Ciubotariu
2019-10-24 15:07         ` Wolfram Sang
2019-10-24 15:07           ` Wolfram Sang
2019-10-25  1:14           ` Phil Reid
2019-10-25  1:14             ` Phil Reid
2019-10-25  1:14             ` Phil Reid
2020-08-25 13:28             ` Wolfram Sang
2020-08-25 13:28               ` Wolfram Sang
2020-08-25 23:44               ` Phil Reid
2020-08-25 23:44                 ` Phil Reid
2019-10-02 14:46 ` [PATCH 3/4] ARM: at91/dt: sama5d3: add i2c gpio pinctrl Kamel Bouhara
2019-10-02 14:46   ` Kamel Bouhara
2019-10-02 14:46 ` [PATCH 4/4] ARM: at91/dt: sama5d4: " Kamel Bouhara
2019-10-02 14:46   ` Kamel Bouhara
2019-10-15 19:10 ` [PATCH 0/4] i2c bus recovery for Microchip SoCs Rob Herring
2019-10-15 19:10   ` Rob Herring

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=20191021202044.GB3607@kunai \
    --to=wsa@the-dreams.de \
    --cc=alexandre.belloni@bootlin.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kamel.bouhara@bootlin.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ludovic.desroches@microchip.com \
    --cc=nicolas.ferre@microchip.com \
    --cc=thomas.petazzoni@bootlin.com \
    /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.