All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Reid <preid@electromag.com.au>
To: Wolfram Sang <wsa@the-dreams.de>,
	Codrin.Ciubotariu@microchip.com, kamel.bouhara@bootlin.com,
	linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org,
	linux-kernel@vger.kernel.org, Nicolas.Ferre@microchip.com,
	alexandre.belloni@bootlin.com, Ludovic.Desroches@microchip.com,
	devicetree@vger.kernel.org, thomas.petazzoni@bootlin.com
Subject: Re: [PATCH 2/4] i2c: at91: implement i2c bus recovery
Date: Wed, 26 Aug 2020 07:44:02 +0800	[thread overview]
Message-ID: <8deeae50-2d67-d728-7afd-1b8f1b7a927e@electromag.com.au> (raw)
In-Reply-To: <20200825132846.GA1753@kunai>

On 25/08/2020 21:28, Wolfram Sang wrote:
> Hi Phil,
> 
> yes, this thread is old but a similar issue came up again...
> 
> On Fri, Oct 25, 2019 at 09:14:00AM +0800, Phil Reid wrote:
> 
>>>
>>>> So at the beginning of a new transfer, we should check if SDA (or SCL?)
>>>> is low and, if it's true, only then we should try recover the bus.
>>>
>>> Yes, this is the proper time to do it. Remember, I2C does not define a
>>> timeout.
>>>
>>
>> FYI: Just a single poll at the start of the transfer, for it being low, will cause problems with multi-master buses.
>> Bus recovery should be attempted after a timeout when trying to communicate, even thou i2c doesn't define a timeout.
>>
>> I'm trying to fix the designware drivers handling of this at the moment.
> 
> I wonder what you ended up with? You are right, a single poll is not
> enough. It only might be if one applies the new "single-master" binding
> for a given bus. If that is not present, my best idea so far is to poll
> SDA for the time defined in adapter->timeout and if it is all low, then
> initiate a recovery.
> 

On my todo list still.

Our system eventually recovers at the moment and the multi-master bus
doesn't contain anything that's time critical to our systems operation.


-- 
Regards
Phil Reid

ElectroMagnetic Imaging Technology Pty Ltd
Development of Geophysical Instrumentation & Software
www.electromag.com.au

3 The Avenue, Midland WA 6056, AUSTRALIA
Ph: +61 8 9250 8100
Fax: +61 8 9250 7100
Email: preid@electromag.com.au

WARNING: multiple messages have this Message-ID (diff)
From: Phil Reid <preid@electromag.com.au>
To: Wolfram Sang <wsa@the-dreams.de>,
	Codrin.Ciubotariu@microchip.com, kamel.bouhara@bootlin.com,
	linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org,
	linux-kernel@vger.kernel.org, Nicolas.Ferre@microchip.com,
	alexandre.belloni@bootlin.com, Ludovic.Desroches@microchip.com,
	devicetree@vger.kernel.org, thomas.petazzoni@bootlin.com
Subject: Re: [PATCH 2/4] i2c: at91: implement i2c bus recovery
Date: Wed, 26 Aug 2020 07:44:02 +0800	[thread overview]
Message-ID: <8deeae50-2d67-d728-7afd-1b8f1b7a927e@electromag.com.au> (raw)
In-Reply-To: <20200825132846.GA1753@kunai>

On 25/08/2020 21:28, Wolfram Sang wrote:
> Hi Phil,
> 
> yes, this thread is old but a similar issue came up again...
> 
> On Fri, Oct 25, 2019 at 09:14:00AM +0800, Phil Reid wrote:
> 
>>>
>>>> So at the beginning of a new transfer, we should check if SDA (or SCL?)
>>>> is low and, if it's true, only then we should try recover the bus.
>>>
>>> Yes, this is the proper time to do it. Remember, I2C does not define a
>>> timeout.
>>>
>>
>> FYI: Just a single poll at the start of the transfer, for it being low, will cause problems with multi-master buses.
>> Bus recovery should be attempted after a timeout when trying to communicate, even thou i2c doesn't define a timeout.
>>
>> I'm trying to fix the designware drivers handling of this at the moment.
> 
> I wonder what you ended up with? You are right, a single poll is not
> enough. It only might be if one applies the new "single-master" binding
> for a given bus. If that is not present, my best idea so far is to poll
> SDA for the time defined in adapter->timeout and if it is all low, then
> initiate a recovery.
> 

On my todo list still.

Our system eventually recovers at the moment and the multi-master bus
doesn't contain anything that's time critical to our systems operation.


-- 
Regards
Phil Reid

ElectroMagnetic Imaging Technology Pty Ltd
Development of Geophysical Instrumentation & Software
www.electromag.com.au

3 The Avenue, Midland WA 6056, AUSTRALIA
Ph: +61 8 9250 8100
Fax: +61 8 9250 7100
Email: preid@electromag.com.au

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

  reply	other threads:[~2020-08-25 23:50 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
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 [this message]
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=8deeae50-2d67-d728-7afd-1b8f1b7a927e@electromag.com.au \
    --to=preid@electromag.com.au \
    --cc=Codrin.Ciubotariu@microchip.com \
    --cc=Ludovic.Desroches@microchip.com \
    --cc=Nicolas.Ferre@microchip.com \
    --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=thomas.petazzoni@bootlin.com \
    --cc=wsa@the-dreams.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 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.