All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman-l0cyMroinI0@public.gmane.org>
To: Shubhrajyoti D <shubhrajyoti-l0cyMroinI0@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org,
	Vikram Pandita <vikram.pandita-l0cyMroinI0@public.gmane.org>,
	Jon Hunter <jon-hunter-l0cyMroinI0@public.gmane.org>
Subject: Re: [PATCH v2] I2C: OMAP: Recover from Bus Busy condition
Date: Wed, 11 Jan 2012 14:28:20 -0800	[thread overview]
Message-ID: <87vcoh27sr.fsf@ti.com> (raw)
In-Reply-To: <1326303693-30106-1-git-send-email-shubhrajyoti-l0cyMroinI0@public.gmane.org> (Shubhrajyoti D.'s message of "Wed, 11 Jan 2012 23:11:33 +0530")

Shubhrajyoti D <shubhrajyoti-l0cyMroinI0@public.gmane.org> writes:

> From: Vikram Pandita <vikram.pandita-l0cyMroinI0@public.gmane.org>
>
> In case a peripheral is driving SDA bus low (ie. a start condition), provide
> a constant clock output using the test mode of the OMAP I2C controller to
> try and clear the bus. Soft reset I2C controller after attempting the bus clear
> to ensure that controller is in a good state.
>
> Based upon Vikram Pandita's patch from TI Android 3.0 kernel and modified for
> mainline by Jon Hunter. 
>
> A couple differences from the original patch ...
> 1. Add a new function for bus clear
> 2. Ensure that the CON.I2C_EN bit is set when using the SYSTEST feature to
>    output a permanent clock. This bit needs to be set and tpyically it would
>    be set by the unidle function but this is not the case for all OMAP
>    generations.
> 3. Program the SYSTEST setting only the bits we care about. However, restore
>    SYSTEST registers to there original state as some OMAP generations do not
>    implement perform a soft-reset.
> 4. Clear the CON register after performing the bus clear, so when we call the
>    init function the controller is disabled and the init function will
>    re-enable later.
>
> Cc:  Kevin Hilman <khilman-l0cyMroinI0@public.gmane.org>
> Signed-off-by: Vikram Pandita <vikram.pandita-l0cyMroinI0@public.gmane.org>
> Signed-off-by: Jon Hunter <jon-hunter-l0cyMroinI0@public.gmane.org>
> Signed-off-by: Shubhrajyoti D <shubhrajyoti-l0cyMroinI0@public.gmane.org>
> ---
> Original patch can be found here:
> http://git.omapzoom.org/?p=kernel/omap.git;a=commit;h=a2ab04192ba25e60f95ba1ff3af5601a2d7b5bd1
> applies on Kevin's for_3.3/i2c/misc

Please also explain how this was tested, and on what platforms.

Thanks,

Kevin

WARNING: multiple messages have this Message-ID (diff)
From: khilman@ti.com (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] I2C: OMAP: Recover from Bus Busy condition
Date: Wed, 11 Jan 2012 14:28:20 -0800	[thread overview]
Message-ID: <87vcoh27sr.fsf@ti.com> (raw)
In-Reply-To: <1326303693-30106-1-git-send-email-shubhrajyoti@ti.com> (Shubhrajyoti D.'s message of "Wed, 11 Jan 2012 23:11:33 +0530")

Shubhrajyoti D <shubhrajyoti@ti.com> writes:

> From: Vikram Pandita <vikram.pandita@ti.com>
>
> In case a peripheral is driving SDA bus low (ie. a start condition), provide
> a constant clock output using the test mode of the OMAP I2C controller to
> try and clear the bus. Soft reset I2C controller after attempting the bus clear
> to ensure that controller is in a good state.
>
> Based upon Vikram Pandita's patch from TI Android 3.0 kernel and modified for
> mainline by Jon Hunter. 
>
> A couple differences from the original patch ...
> 1. Add a new function for bus clear
> 2. Ensure that the CON.I2C_EN bit is set when using the SYSTEST feature to
>    output a permanent clock. This bit needs to be set and tpyically it would
>    be set by the unidle function but this is not the case for all OMAP
>    generations.
> 3. Program the SYSTEST setting only the bits we care about. However, restore
>    SYSTEST registers to there original state as some OMAP generations do not
>    implement perform a soft-reset.
> 4. Clear the CON register after performing the bus clear, so when we call the
>    init function the controller is disabled and the init function will
>    re-enable later.
>
> Cc:  Kevin Hilman <khilman@ti.com>
> Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
> Signed-off-by: Jon Hunter <jon-hunter@ti.com>
> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
> ---
> Original patch can be found here:
> http://git.omapzoom.org/?p=kernel/omap.git;a=commit;h=a2ab04192ba25e60f95ba1ff3af5601a2d7b5bd1
> applies on Kevin's for_3.3/i2c/misc

Please also explain how this was tested, and on what platforms.

Thanks,

Kevin

  parent reply	other threads:[~2012-01-11 22:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-11 17:41 [PATCH v2] I2C: OMAP: Recover from Bus Busy condition Shubhrajyoti D
2012-01-11 17:41 ` Shubhrajyoti D
     [not found] ` <1326303693-30106-1-git-send-email-shubhrajyoti-l0cyMroinI0@public.gmane.org>
2012-01-11 22:28   ` Kevin Hilman [this message]
2012-01-11 22:28     ` Kevin Hilman
     [not found]     ` <87vcoh27sr.fsf-l0cyMroinI0@public.gmane.org>
2012-01-12  6:07       ` Shubhrajyoti
2012-01-12  6:07         ` Shubhrajyoti
  -- strict thread matches above, loose matches on Subject: below --
2012-01-11 17:42 Shubhrajyoti D
2012-01-11 17:42 ` Shubhrajyoti D
     [not found] ` <1326303765-30140-1-git-send-email-shubhrajyoti-l0cyMroinI0@public.gmane.org>
2012-01-12  5:55   ` Shubhrajyoti
2012-01-12  5:55     ` Shubhrajyoti

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=87vcoh27sr.fsf@ti.com \
    --to=khilman-l0cymroini0@public.gmane.org \
    --cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
    --cc=jon-hunter-l0cyMroinI0@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=shubhrajyoti-l0cyMroinI0@public.gmane.org \
    --cc=vikram.pandita-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 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.