diff options
author | Mark Brown <broonie@linaro.org> | 2013-10-25 04:51:38 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-10-25 04:51:38 -0400 |
commit | 84b61465645fc075ab1128ebd4c34f6905037634 (patch) | |
tree | c1dbc78e31c93914097ef214a16d1c940074217d /drivers/spi | |
parent | d448121c4c6db34cd73256bf6eb5a97c62e18e7b (diff) | |
parent | 9d7fd21acb2094d38d8560b0b3c91fa31efa6a71 (diff) |
Merge remote-tracking branch 'spi/topic/s3c64xx' into spi-next
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-s3c64xx.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 508f51fc5704..9e2020df9e0f 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c | |||
@@ -1459,11 +1459,14 @@ static int s3c64xx_spi_suspend(struct device *dev) | |||
1459 | struct spi_master *master = dev_get_drvdata(dev); | 1459 | struct spi_master *master = dev_get_drvdata(dev); |
1460 | struct s3c64xx_spi_driver_data *sdd = spi_master_get_devdata(master); | 1460 | struct s3c64xx_spi_driver_data *sdd = spi_master_get_devdata(master); |
1461 | 1461 | ||
1462 | spi_master_suspend(master); | 1462 | int ret = spi_master_suspend(master); |
1463 | if (ret) | ||
1464 | return ret; | ||
1463 | 1465 | ||
1464 | /* Disable the clock */ | 1466 | if (!pm_runtime_suspended(dev)) { |
1465 | clk_disable_unprepare(sdd->src_clk); | 1467 | clk_disable_unprepare(sdd->clk); |
1466 | clk_disable_unprepare(sdd->clk); | 1468 | clk_disable_unprepare(sdd->src_clk); |
1469 | } | ||
1467 | 1470 | ||
1468 | sdd->cur_speed = 0; /* Output Clock is stopped */ | 1471 | sdd->cur_speed = 0; /* Output Clock is stopped */ |
1469 | 1472 | ||
@@ -1479,15 +1482,14 @@ static int s3c64xx_spi_resume(struct device *dev) | |||
1479 | if (sci->cfg_gpio) | 1482 | if (sci->cfg_gpio) |
1480 | sci->cfg_gpio(); | 1483 | sci->cfg_gpio(); |
1481 | 1484 | ||
1482 | /* Enable the clock */ | 1485 | if (!pm_runtime_suspended(dev)) { |
1483 | clk_prepare_enable(sdd->src_clk); | 1486 | clk_prepare_enable(sdd->src_clk); |
1484 | clk_prepare_enable(sdd->clk); | 1487 | clk_prepare_enable(sdd->clk); |
1488 | } | ||
1485 | 1489 | ||
1486 | s3c64xx_spi_hwinit(sdd, sdd->port_id); | 1490 | s3c64xx_spi_hwinit(sdd, sdd->port_id); |
1487 | 1491 | ||
1488 | spi_master_resume(master); | 1492 | return spi_master_resume(master); |
1489 | |||
1490 | return 0; | ||
1491 | } | 1493 | } |
1492 | #endif /* CONFIG_PM_SLEEP */ | 1494 | #endif /* CONFIG_PM_SLEEP */ |
1493 | 1495 | ||