aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-07-28 10:34:06 -0400
committerMark Brown <broonie@linaro.org>2013-07-29 13:00:19 -0400
commit5355d96d6fb56507761f261a23c0831f67fa0e0f (patch)
tree2f1516bb9c4f5eae02c77d07b558a66363e7e507
parent49834de234f3cf592c3d242c889ca603db8e7050 (diff)
spi/bcm63xx: Convert to core runtime PM
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--drivers/spi/spi-bcm63xx.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c
index 9fd7a39b8029..4ac028d6b2d8 100644
--- a/drivers/spi/spi-bcm63xx.c
+++ b/drivers/spi/spi-bcm63xx.c
@@ -231,24 +231,6 @@ static int bcm63xx_txrx_bufs(struct spi_device *spi, struct spi_transfer *first,
231 return 0; 231 return 0;
232} 232}
233 233
234static int bcm63xx_spi_prepare_transfer(struct spi_master *master)
235{
236 struct bcm63xx_spi *bs = spi_master_get_devdata(master);
237
238 pm_runtime_get_sync(&bs->pdev->dev);
239
240 return 0;
241}
242
243static int bcm63xx_spi_unprepare_transfer(struct spi_master *master)
244{
245 struct bcm63xx_spi *bs = spi_master_get_devdata(master);
246
247 pm_runtime_put(&bs->pdev->dev);
248
249 return 0;
250}
251
252static int bcm63xx_spi_transfer_one(struct spi_master *master, 234static int bcm63xx_spi_transfer_one(struct spi_master *master,
253 struct spi_message *m) 235 struct spi_message *m)
254{ 236{
@@ -412,11 +394,10 @@ static int bcm63xx_spi_probe(struct platform_device *pdev)
412 394
413 master->bus_num = pdata->bus_num; 395 master->bus_num = pdata->bus_num;
414 master->num_chipselect = pdata->num_chipselect; 396 master->num_chipselect = pdata->num_chipselect;
415 master->prepare_transfer_hardware = bcm63xx_spi_prepare_transfer;
416 master->unprepare_transfer_hardware = bcm63xx_spi_unprepare_transfer;
417 master->transfer_one_message = bcm63xx_spi_transfer_one; 397 master->transfer_one_message = bcm63xx_spi_transfer_one;
418 master->mode_bits = MODEBITS; 398 master->mode_bits = MODEBITS;
419 master->bits_per_word_mask = SPI_BPW_MASK(8); 399 master->bits_per_word_mask = SPI_BPW_MASK(8);
400 master->auto_runtime_pm = true;
420 bs->msg_type_shift = pdata->msg_type_shift; 401 bs->msg_type_shift = pdata->msg_type_shift;
421 bs->msg_ctl_width = pdata->msg_ctl_width; 402 bs->msg_ctl_width = pdata->msg_ctl_width;
422 bs->tx_io = (u8 *)(bs->regs + bcm63xx_spireg(SPI_MSG_DATA)); 403 bs->tx_io = (u8 *)(bs->regs + bcm63xx_spireg(SPI_MSG_DATA));