linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: 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>,
	Linus Walleij
	<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linaro-kernel-cunTk1MwBs8s++Sfvej+rw@public.gmane.org,
	Mark Brown <broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Subject: [PATCH 10/11] spi/tegra20-sflash: Use core runtime PM
Date: Sun, 28 Jul 2013 15:43:25 +0100	[thread overview]
Message-ID: <1375022606-7576-10-git-send-email-broonie@kernel.org> (raw)
In-Reply-To: <1375022606-7576-1-git-send-email-broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>

From: Mark Brown <broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

Signed-off-by: Mark Brown <broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
 drivers/spi/spi-tegra20-sflash.c | 26 +-------------------------
 1 file changed, 1 insertion(+), 25 deletions(-)

diff --git a/drivers/spi/spi-tegra20-sflash.c b/drivers/spi/spi-tegra20-sflash.c
index f871c4e..1d814dc 100644
--- a/drivers/spi/spi-tegra20-sflash.c
+++ b/drivers/spi/spi-tegra20-sflash.c
@@ -325,20 +325,6 @@ static int tegra_sflash_setup(struct spi_device *spi)
 	return 0;
 }
 
-static int tegra_sflash_prepare_transfer(struct spi_master *spi)
-{
-	struct tegra_sflash_data *tsd = spi_master_get_devdata(spi);
-	int ret;
-
-	ret = pm_runtime_get_sync(tsd->dev);
-	if (ret < 0) {
-		dev_err(tsd->dev, "runtime PM get failed: %d\n", ret);
-		return ret;
-	}
-
-	return ret;
-}
-
 static int tegra_sflash_transfer_one_message(struct spi_master *master,
 			struct spi_message *msg)
 {
@@ -391,15 +377,6 @@ exit:
 	return ret;
 }
 
-static int tegra_sflash_unprepare_transfer(struct spi_master *spi)
-{
-	struct tegra_sflash_data *tsd = spi_master_get_devdata(spi);
-
-	pm_runtime_put(tsd->dev);
-
-	return 0;
-}
-
 static irqreturn_t handle_cpu_based_xfer(struct tegra_sflash_data *tsd)
 {
 	struct spi_transfer *t = tsd->curr_xfer;
@@ -492,9 +469,8 @@ static int tegra_sflash_probe(struct platform_device *pdev)
 	/* the spi->mode bits understood by this driver: */
 	master->mode_bits = SPI_CPOL | SPI_CPHA;
 	master->setup = tegra_sflash_setup;
-	master->prepare_transfer_hardware = tegra_sflash_prepare_transfer;
 	master->transfer_one_message = tegra_sflash_transfer_one_message;
-	master->unprepare_transfer_hardware = tegra_sflash_unprepare_transfer;
+	master->auto_runtime_pm = true;
 	master->num_chipselect = MAX_CHIP_SELECT;
 	master->bus_num = -1;
 
-- 
1.8.3.2

  parent reply	other threads:[~2013-07-28 14:43 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
2013-07-28 14:43 ` [PATCH 09/11] spi/tegra114: Use " 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   ` Mark Brown [this message]
2013-07-28 20:51   ` [PATCH 01/11] spi: Provide core support for runtime PM during transfers Linus Walleij
2013-07-29  5:56     ` Mark Brown
2013-07-28 14:43 ` [PATCH 11/11] spi/tegra20-slink: Use core runtime PM 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=1375022606-7576-10-git-send-email-broonie@kernel.org \
    --to=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=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).