diff options
author | Mark Brown <broonie@linaro.org> | 2013-07-28 10:35:36 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-07-29 13:00:21 -0400 |
commit | 3e00a09d2fbd64f0ad98e7c8c29dbf9e038fc746 (patch) | |
tree | 948ff336c831386b548f3d8d7c2acf9ff91079d0 | |
parent | 7dd62787334ac6e0e2a0ef3f20bb1936ac431b04 (diff) |
spi/hspi: Convert to core runtime PM
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | drivers/spi/spi-sh-hspi.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/spi/spi-sh-hspi.c b/drivers/spi/spi-sh-hspi.c index 716edf999538..b95d6a9fb80e 100644 --- a/drivers/spi/spi-sh-hspi.c +++ b/drivers/spi/spi-sh-hspi.c | |||
@@ -99,21 +99,6 @@ static int hspi_status_check_timeout(struct hspi_priv *hspi, u32 mask, u32 val) | |||
99 | /* | 99 | /* |
100 | * spi master function | 100 | * spi master function |
101 | */ | 101 | */ |
102 | static int hspi_prepare_transfer(struct spi_master *master) | ||
103 | { | ||
104 | struct hspi_priv *hspi = spi_master_get_devdata(master); | ||
105 | |||
106 | pm_runtime_get_sync(hspi->dev); | ||
107 | return 0; | ||
108 | } | ||
109 | |||
110 | static int hspi_unprepare_transfer(struct spi_master *master) | ||
111 | { | ||
112 | struct hspi_priv *hspi = spi_master_get_devdata(master); | ||
113 | |||
114 | pm_runtime_put_sync(hspi->dev); | ||
115 | return 0; | ||
116 | } | ||
117 | 102 | ||
118 | #define hspi_hw_cs_enable(hspi) hspi_hw_cs_ctrl(hspi, 0) | 103 | #define hspi_hw_cs_enable(hspi) hspi_hw_cs_ctrl(hspi, 0) |
119 | #define hspi_hw_cs_disable(hspi) hspi_hw_cs_ctrl(hspi, 1) | 104 | #define hspi_hw_cs_disable(hspi) hspi_hw_cs_ctrl(hspi, 1) |
@@ -316,9 +301,8 @@ static int hspi_probe(struct platform_device *pdev) | |||
316 | master->setup = hspi_setup; | 301 | master->setup = hspi_setup; |
317 | master->cleanup = hspi_cleanup; | 302 | master->cleanup = hspi_cleanup; |
318 | master->mode_bits = SPI_CPOL | SPI_CPHA; | 303 | master->mode_bits = SPI_CPOL | SPI_CPHA; |
319 | master->prepare_transfer_hardware = hspi_prepare_transfer; | 304 | master->auto_runtime_pm = true; |
320 | master->transfer_one_message = hspi_transfer_one_message; | 305 | master->transfer_one_message = hspi_transfer_one_message; |
321 | master->unprepare_transfer_hardware = hspi_unprepare_transfer; | ||
322 | ret = spi_register_master(master); | 306 | ret = spi_register_master(master); |
323 | if (ret < 0) { | 307 | if (ret < 0) { |
324 | dev_err(&pdev->dev, "spi_register_master error.\n"); | 308 | dev_err(&pdev->dev, "spi_register_master error.\n"); |