public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Gregory CLEMENT <gregory.clement@free-electrons.com>
To: David Brownell <david-b@pacbell.net>
Cc: Kevin Hilman <khilman@deeprootsystems.com>,
	linux-omap <linux-omap@vger.kernel.org>,
	spi-devel-general@lists.sourceforge.net,
	Grant Likely <grant.likely@secretlab.ca>
Subject: Re: [PATCH v5 1/1] OMAP2: Spi: Force CS to be in inactive state after off-mode transition
Date: Tue, 30 Nov 2010 09:26:04 +0100	[thread overview]
Message-ID: <4CF4B51C.7030902@free-electrons.com> (raw)
In-Reply-To: <509131.41359.qm@web180304.mail.gq1.yahoo.com>

On 11/30/2010 04:08 AM, David Brownell wrote:
>>> Now force CS to be in inactive state only if it was
>> inactive when it was suspended.
> 
> Note that it's a bug if CS is active in
> any suspend state (including OFF).  That
> strongly suggests $SUBJECT is an incomplete
> workaround for that other bug...
> 

It is not the case, at least it is not what we
observed. In suspend state, CS is inactive.

>>>
>>> When SPI wake up from OFF mode, CS is in the wrong
>> state: force it to the inactive state.
> 
> Best report the bug that the suspend/OFF state
> was mis-handled...  That is, it didn't
> correctly ENTER that OFF mode...
> 
> In fact ... I'd like to see that fixed more
> than the $SUBJECT issue, so the root cause
> gets resolved...

As far as I know, it enter correctly that OFF mode.
It is only at wake up, that CS become active while
there is no SPI message being processed. It is the
point of my patch.

My first patch version forced unconditionally CS to
inactive state at wake up. It was correct from the
point of view of the SPI but not for suspend/resume.
Resume should only restore the state of the driver
just before suspend. If resume force the inactive
state it could mask a bug in the suspend path.
But as I wrote before, as far as I know there is no
bug when driver enter suspend mode, at this moment
CS is inactive.

> 
> CS should only be active while a SPI message
> is being processed, and such processing must
> have completed before suspend/OFF/... starts
> 
I agree and this driver seems to respect this point.

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

      reply	other threads:[~2010-11-30  8:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-24 22:19 [PATCH v5 1/1] OMAP2: Spi: Force CS to be in inactive state after off-mode transition Gregory CLEMENT
2010-11-25  0:49 ` Kevin Hilman
2010-11-25  3:55   ` David Brownell
2010-11-29 16:59   ` Gregory CLEMENT
2010-12-23 23:08   ` Grant Likely
2010-12-24 10:38     ` Gregory CLEMENT
2010-11-25  8:58 ` Hemanth V
2010-11-29 17:18   ` Gregory CLEMENT
2010-11-29 14:22 ` Kevin Hilman
2010-11-29 17:03   ` Gregory CLEMENT
2010-11-30  3:08   ` David Brownell
2010-11-30  8:26     ` Gregory CLEMENT [this message]

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=4CF4B51C.7030902@free-electrons.com \
    --to=gregory.clement@free-electrons.com \
    --cc=david-b@pacbell.net \
    --cc=grant.likely@secretlab.ca \
    --cc=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=spi-devel-general@lists.sourceforge.net \
    /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