diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/spi/spi-omap2-mcspi.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c index 1907ed2e2958..0b0da2f7ce23 100644 --- a/drivers/spi/spi-omap2-mcspi.c +++ b/drivers/spi/spi-omap2-mcspi.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <plat/mcspi.h> | 44 | #include <plat/mcspi.h> |
45 | 45 | ||
46 | #define OMAP2_MCSPI_MAX_FREQ 48000000 | 46 | #define OMAP2_MCSPI_MAX_FREQ 48000000 |
47 | #define SPI_AUTOSUSPEND_TIMEOUT 2000 | ||
47 | 48 | ||
48 | #define OMAP2_MCSPI_REVISION 0x00 | 49 | #define OMAP2_MCSPI_REVISION 0x00 |
49 | #define OMAP2_MCSPI_SYSSTATUS 0x14 | 50 | #define OMAP2_MCSPI_SYSSTATUS 0x14 |
@@ -265,7 +266,8 @@ static void omap2_mcspi_restore_ctx(struct omap2_mcspi *mcspi) | |||
265 | } | 266 | } |
266 | static void omap2_mcspi_disable_clocks(struct omap2_mcspi *mcspi) | 267 | static void omap2_mcspi_disable_clocks(struct omap2_mcspi *mcspi) |
267 | { | 268 | { |
268 | pm_runtime_put_sync(mcspi->dev); | 269 | pm_runtime_mark_last_busy(mcspi->dev); |
270 | pm_runtime_put_autosuspend(mcspi->dev); | ||
269 | } | 271 | } |
270 | 272 | ||
271 | static int omap2_mcspi_enable_clocks(struct omap2_mcspi *mcspi) | 273 | static int omap2_mcspi_enable_clocks(struct omap2_mcspi *mcspi) |
@@ -1212,6 +1214,8 @@ static int __devinit omap2_mcspi_probe(struct platform_device *pdev) | |||
1212 | if (status < 0) | 1214 | if (status < 0) |
1213 | goto dma_chnl_free; | 1215 | goto dma_chnl_free; |
1214 | 1216 | ||
1217 | pm_runtime_use_autosuspend(&pdev->dev); | ||
1218 | pm_runtime_set_autosuspend_delay(&pdev->dev, SPI_AUTOSUSPEND_TIMEOUT); | ||
1215 | pm_runtime_enable(&pdev->dev); | 1219 | pm_runtime_enable(&pdev->dev); |
1216 | 1220 | ||
1217 | if (status || omap2_mcspi_master_setup(mcspi) < 0) | 1221 | if (status || omap2_mcspi_master_setup(mcspi) < 0) |