All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spi/s3c64x: Ensure runtime PM is enabled prior to registration
@ 2013-09-27 10:53 Mark Brown
  2013-09-27 11:05 ` Sylwester Nawrocki
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2013-09-27 10:53 UTC (permalink / raw)
  To: Kukjin Kim; +Cc: linux-samsung-soc, linux-spi, linaro-kernel, Mark Brown

From: Mark Brown <broonie@linaro.org>

Otherwise we may try to start transfers immediately and then fail to
runtime resume the device causing us not to have clocks enabled.

Signed-off-by: Mark Brown <broonie@linaro.org>
---
 drivers/spi/spi-s3c64xx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 84cc6ac..229c6b9 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -1428,6 +1428,8 @@ static int s3c64xx_spi_probe(struct platform_device *pdev)
 	       S3C64XX_SPI_INT_TX_OVERRUN_EN | S3C64XX_SPI_INT_TX_UNDERRUN_EN,
 	       sdd->regs + S3C64XX_SPI_INT_EN);
 
+	pm_runtime_enable(&pdev->dev);
+
 	ret = devm_spi_register_master(&pdev->dev, master);
 	if (ret != 0) {
 		dev_err(&pdev->dev, "cannot register SPI master: %d\n", ret);
@@ -1440,8 +1442,6 @@ static int s3c64xx_spi_probe(struct platform_device *pdev)
 					mem_res,
 					sdd->rx_dma.dmach, sdd->tx_dma.dmach);
 
-	pm_runtime_enable(&pdev->dev);
-
 	return 0;
 
 err3:
-- 
1.8.4.rc3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] spi/s3c64x: Ensure runtime PM is enabled prior to registration
  2013-09-27 10:53 [PATCH] spi/s3c64x: Ensure runtime PM is enabled prior to registration Mark Brown
@ 2013-09-27 11:05 ` Sylwester Nawrocki
  0 siblings, 0 replies; 2+ messages in thread
From: Sylwester Nawrocki @ 2013-09-27 11:05 UTC (permalink / raw)
  To: Mark Brown, Kukjin Kim
  Cc: linux-samsung-soc, linux-spi, linaro-kernel, Mark Brown

On 27/09/13 12:53, Mark Brown wrote:
> From: Mark Brown <broonie@linaro.org>
> 
> Otherwise we may try to start transfers immediately and then fail to
> runtime resume the device causing us not to have clocks enabled.
> 
> Signed-off-by: Mark Brown <broonie@linaro.org>

Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>

There is only a small typo in the subject line, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-09-27 11:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-27 10:53 [PATCH] spi/s3c64x: Ensure runtime PM is enabled prior to registration Mark Brown
2013-09-27 11:05 ` Sylwester Nawrocki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.