aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-pl022.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-07-28 10:35:08 -0400
committerMark Brown <broonie@linaro.org>2013-07-29 13:00:20 -0400
commit29b6e906a70a47c9cdd7406a8c20ef5098f0b4e8 (patch)
tree6b6305b65d449b296d16320046e6d9f646504805 /drivers/spi/spi-pl022.c
parentf0278a1a40f895095201b08ff5d0168b8fbd26a5 (diff)
spi/pl022: Convert to core runtime PM
Signed-off-by: Mark Brown <broonie@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/spi/spi-pl022.c')
-rw-r--r--drivers/spi/spi-pl022.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
index abef061fb84a..07e6db6c810f 100644
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -1555,18 +1555,6 @@ static int pl022_transfer_one_message(struct spi_master *master,
1555 return 0; 1555 return 0;
1556} 1556}
1557 1557
1558static int pl022_prepare_transfer_hardware(struct spi_master *master)
1559{
1560 struct pl022 *pl022 = spi_master_get_devdata(master);
1561
1562 /*
1563 * Just make sure we have all we need to run the transfer by syncing
1564 * with the runtime PM framework.
1565 */
1566 pm_runtime_get_sync(&pl022->adev->dev);
1567 return 0;
1568}
1569
1570static int pl022_unprepare_transfer_hardware(struct spi_master *master) 1558static int pl022_unprepare_transfer_hardware(struct spi_master *master)
1571{ 1559{
1572 struct pl022 *pl022 = spi_master_get_devdata(master); 1560 struct pl022 *pl022 = spi_master_get_devdata(master);
@@ -1575,13 +1563,6 @@ static int pl022_unprepare_transfer_hardware(struct spi_master *master)
1575 writew((readw(SSP_CR1(pl022->virtbase)) & 1563 writew((readw(SSP_CR1(pl022->virtbase)) &
1576 (~SSP_CR1_MASK_SSE)), SSP_CR1(pl022->virtbase)); 1564 (~SSP_CR1_MASK_SSE)), SSP_CR1(pl022->virtbase));
1577 1565
1578 if (pl022->master_info->autosuspend_delay > 0) {
1579 pm_runtime_mark_last_busy(&pl022->adev->dev);
1580 pm_runtime_put_autosuspend(&pl022->adev->dev);
1581 } else {
1582 pm_runtime_put(&pl022->adev->dev);
1583 }
1584
1585 return 0; 1566 return 0;
1586} 1567}
1587 1568
@@ -2139,7 +2120,7 @@ static int pl022_probe(struct amba_device *adev, const struct amba_id *id)
2139 master->num_chipselect = num_cs; 2120 master->num_chipselect = num_cs;
2140 master->cleanup = pl022_cleanup; 2121 master->cleanup = pl022_cleanup;
2141 master->setup = pl022_setup; 2122 master->setup = pl022_setup;
2142 master->prepare_transfer_hardware = pl022_prepare_transfer_hardware; 2123 master->auto_runtime_pm = true;
2143 master->transfer_one_message = pl022_transfer_one_message; 2124 master->transfer_one_message = pl022_transfer_one_message;
2144 master->unprepare_transfer_hardware = pl022_unprepare_transfer_hardware; 2125 master->unprepare_transfer_hardware = pl022_unprepare_transfer_hardware;
2145 master->rt = platform_info->rt; 2126 master->rt = platform_info->rt;