All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	spi-devel-general@lists.sourceforge.net
Cc: Magnus Damm <magnus.damm@gmail.com>, linux-sh@vger.kernel.org
Subject: Re: [PATCH/RFC] spi: sh-msiof: per-transaction runtime PM
Date: Thu, 15 Mar 2012 09:51:11 +0000	[thread overview]
Message-ID: <20120315095111.C1B3F3E0899@localhost> (raw)
In-Reply-To: <Pine.LNX.4.64.1203141828230.30291@axis700.grange>

On Wed, 14 Mar 2012 18:35:58 +0100 (CET), Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote:
> Currently the spi-sh-msiof driver implements a runtime PM scheme, based on
> chipselect toggling. However, this is largely inefficient, since SPI
> client drivers are allowed to keep the chipselect active for long periods
> of time. This patch allows the driver to runtime-suspend the controller
> between SPI transfers. While moving runtime-PM hooks this patch also 
> removes manual PM clock manipulation.
> 
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> ---
> 
> Marked as RFC, because I'm actually not sure, whether suspending after 
> each transfer is actually allowed. This seems to bring problems with 
> mmc-spi at least. Some commands return errors, but a retry recovers. More 
> investigation is required. Any hints concerning why this is not perfectly 
> functioning would be appreciated!

Suspending in the txrx function is fine since each bitbang instance gets its own
workqueue.  It's only the transfer() hook (which bitbang supplies for you) that
cannot sleep.

g.


WARNING: multiple messages have this Message-ID (diff)
From: Grant Likely <grant.likely@secretlab.ca>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	spi-devel-general@lists.sourceforge.net
Cc: Magnus Damm <magnus.damm@gmail.com>, linux-sh@vger.kernel.org
Subject: Re: [PATCH/RFC] spi: sh-msiof: per-transaction runtime PM
Date: Thu, 15 Mar 2012 03:51:11 -0600	[thread overview]
Message-ID: <20120315095111.C1B3F3E0899@localhost> (raw)
In-Reply-To: <Pine.LNX.4.64.1203141828230.30291@axis700.grange>

On Wed, 14 Mar 2012 18:35:58 +0100 (CET), Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote:
> Currently the spi-sh-msiof driver implements a runtime PM scheme, based on
> chipselect toggling. However, this is largely inefficient, since SPI
> client drivers are allowed to keep the chipselect active for long periods
> of time. This patch allows the driver to runtime-suspend the controller
> between SPI transfers. While moving runtime-PM hooks this patch also 
> removes manual PM clock manipulation.
> 
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> ---
> 
> Marked as RFC, because I'm actually not sure, whether suspending after 
> each transfer is actually allowed. This seems to bring problems with 
> mmc-spi at least. Some commands return errors, but a retry recovers. More 
> investigation is required. Any hints concerning why this is not perfectly 
> functioning would be appreciated!

Suspending in the txrx function is fine since each bitbang instance gets its own
workqueue.  It's only the transfer() hook (which bitbang supplies for you) that
cannot sleep.

g.


  parent reply	other threads:[~2012-03-15  9:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-14 17:35 [PATCH/RFC] spi: sh-msiof: per-transaction runtime PM Guennadi Liakhovetski
2012-03-14 17:35 ` Guennadi Liakhovetski
2012-03-15  8:58 ` Magnus Damm
2012-03-15  8:58   ` Magnus Damm
     [not found]   ` <CANqRtoQUm5PyVwe-PtQPP1DX+_tAh9ptbj9mSkx48+W4Yh9DiA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-03-15 16:45     ` Guennadi Liakhovetski
2012-03-15 16:45       ` Guennadi Liakhovetski
2012-03-15  9:51 ` Grant Likely [this message]
2012-03-15  9:51   ` Grant Likely
2012-03-15 16:37   ` Guennadi Liakhovetski
2012-03-15 16:37     ` Guennadi Liakhovetski

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=20120315095111.C1B3F3E0899@localhost \
    --to=grant.likely@secretlab.ca \
    --cc=g.liakhovetski@gmx.de \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --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 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.