All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Eric Miao <eric.y.miao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Haojian Zhuang
	<haojian.zhuang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Kukjin Kim <kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
	linux-samsung-soc
	<linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Linux-OMAP <linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linaro-kernel
	<linaro-kernel-cunTk1MwBs8s++Sfvej+rw@public.gmane.org>,
	Mark Brown <broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Subject: Re: [PATCH 01/11] spi: Provide core support for runtime PM during transfers
Date: Sun, 28 Jul 2013 22:51:31 +0200	[thread overview]
Message-ID: <CACRpkdZuUiG0MydJ_k4Br5_10hXr-x4xqNLjWP8D_KFyMPg-zQ@mail.gmail.com> (raw)
In-Reply-To: <1375022606-7576-1-git-send-email-broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>

On Sun, Jul 28, 2013 at 4:43 PM, Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:

> Most SPI drivers that implement runtime PM support use identical code to
> do so: they acquire a runtime PM lock in prepare_transfer_hardware() and
> then they release it in unprepare_transfer_hardware(). The variations in
> this are mostly missing error checking and the choice to use autosuspend.
>
> Since these runtime PM calls are normally the only thing in the prepare
> and unprepare callbacks and the autosuspend API transparently does the
> right thing on devices with autosuspend disabled factor all of this out
> into the core with a flag to enable the behaviour.
>
> Signed-off-by: Mark Brown <broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

Acked-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

> + * @auto_runtime_pm: the core should ensure a runtime PM reference is held
> + *                   while the hardware is prepared

I'd mention here that the reference is taken on the parent
device of the SPI master, i.e. the very platform or AMBA
device, so that it will hit upwards to the bus.

Yours,
Linus Walleij

  parent reply	other threads:[~2013-07-28 20:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-28 14:43 [PATCH 01/11] spi: Provide core support for runtime PM during transfers Mark Brown
2013-07-28 14:43 ` [PATCH 02/11] spi/bcm63xx: Convert to core runtime PM Mark Brown
2013-07-28 14:43 ` [PATCH 03/11] spi/coldfire-qspi: " Mark Brown
2013-07-28 14:43 ` [PATCH 04/11] spi/omap2: Covert " Mark Brown
2013-07-28 21:20   ` Felipe Balbi
2013-07-28 14:43 ` [PATCH 05/11] spi/pl022: Convert " Mark Brown
     [not found]   ` <1375022606-7576-5-git-send-email-broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2013-07-28 20:52     ` Linus Walleij
2013-07-29  6:04       ` Mark Brown
2013-07-28 14:43 ` [PATCH 06/11] spi/pxa2xx: " Mark Brown
2013-07-28 14:43 ` [PATCH 07/11] spi/hspi: " Mark Brown
     [not found] ` <1375022606-7576-1-git-send-email-broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2013-07-28 14:43   ` [PATCH 08/11] spi/s3c64xx: Use core for " Mark Brown
2013-07-28 14:43   ` [PATCH 10/11] spi/tegra20-sflash: Use core " Mark Brown
2013-07-28 20:51   ` Linus Walleij [this message]
2013-07-29  5:56     ` [PATCH 01/11] spi: Provide core support for runtime PM during transfers Mark Brown
2013-07-28 14:43 ` [PATCH 09/11] spi/tegra114: Use core runtime PM Mark Brown
2013-07-28 14:43 ` [PATCH 11/11] spi/tegra20-slink: " Mark Brown
2013-07-29 16:56 ` [PATCH 01/11] spi: Provide core support for runtime PM during transfers Stephen Warren

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=CACRpkdZuUiG0MydJ_k4Br5_10hXr-x4xqNLjWP8D_KFyMPg-zQ@mail.gmail.com \
    --to=linus.walleij-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=eric.y.miao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=haojian.zhuang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=linaro-kernel-cunTk1MwBs8s++Sfvej+rw@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@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.