public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
To: mike.looijmans-Oq418RWZeHk@public.gmane.org
Cc: nsekhar-l0cyMroinI0@public.gmane.org,
	khilman-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org,
	davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Mike Looijmans
	<milo-software-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: [PATCH] i2c-davinci: Implement a bus recovery that actually works
Date: Sun, 9 Mar 2014 21:28:41 +0100	[thread overview]
Message-ID: <20140309202841.GB2835@katana> (raw)
In-Reply-To: <1393583525-9555-1-git-send-email-mike.looijmans-Oq418RWZeHk@public.gmane.org>

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

On Fri, Feb 28, 2014 at 11:32:05AM +0100, mike.looijmans-Oq418RWZeHk@public.gmane.org wrote:
> From: Mike Looijmans <milo-software-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
> 
> Having a board where the I2C bus locks up occasionally made it clear
> that the bus recovery in the i2c-davinci driver will only work on
> some boards, because on regular boards, this will only toggle GPIO
> lines that aren't muxed to the actual pins.
> 
> The I2C controller has the built-in capability to bit-bang its lines.
> Use this to implement a generic recovery routine that puts the
> controller in GPIO mode and pulse the clk lines until both SDA and
> SCL return to a high state.
> 
> Because the controller must be held in reset while doing so, the
> recovery routine must re-init the controller. Since this was already
> being done after each call to i2c_recover_bus, move that call into
> the recovery routine as well.
> 
> Tested on a custom board with OMAP-L138, and after this change, the
> board can recover from chips keeping SDA low.
> 
> Note: This is an adapted port from 2.6.37 code, and was only tested
> with that kernel.

What about using struct i2c_bus_recovery_info, so the actual recovery
logic is taken from the core?

Thanks,

   Wolfram


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2014-03-09 20:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-28 10:32 [PATCH] i2c-davinci: Implement a bus recovery that actually works mike.looijmans-Oq418RWZeHk
     [not found] ` <1393583525-9555-1-git-send-email-mike.looijmans-Oq418RWZeHk@public.gmane.org>
2014-03-09 20:28   ` Wolfram Sang [this message]
2014-03-10  6:54     ` Mike Looijmans
     [not found]       ` <531D619F.5000803-Oq418RWZeHk@public.gmane.org>
2014-03-10  7:26         ` Wolfram Sang
2014-03-10 10:21           ` Mike Looijmans

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=20140309202841.GB2835@katana \
    --to=wsa-z923lk4zbo2bacvfa/9k2g@public.gmane.org \
    --cc=davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org \
    --cc=khilman-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mike.looijmans-Oq418RWZeHk@public.gmane.org \
    --cc=milo-software-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=nsekhar-l0cyMroinI0@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