[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1568376720-7402-3-git-send-email-gareth.williams.jx@renesas.com>
Date: Fri, 13 Sep 2019 13:11:59 +0100
From: Gareth Williams <gareth.williams.jx@...esas.com>
To: Mark Brown <broonie@...nel.org>
Cc: Phil Edworthy <phil.edworthy@...esas.com>,
linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org,
Gareth Williams <gareth.williams.jx@...esas.com>
Subject: [PATCH 2/3] spi: dw: Add basic runtime PM support
From: Phil Edworthy <phil.edworthy@...esas.com>
Enable runtime PM so that the clock used to access the registers in the
peripheral is turned on using a clock domain.
Signed-off-by: Phil Edworthy <phil.edworthy@...esas.com>
Signed-off-by: Gareth Williams <gareth.williams.jx@...esas.com>
---
drivers/spi/spi-dw.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c
index 9a49e07..593bbb0 100644
--- a/drivers/spi/spi-dw.c
+++ b/drivers/spi/spi-dw.c
@@ -10,6 +10,7 @@
#include <linux/module.h>
#include <linux/highmem.h>
#include <linux/delay.h>
+#include <linux/pm_runtime.h>
#include <linux/slab.h>
#include <linux/spi/spi.h>
@@ -497,6 +498,9 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws)
if (dws->set_cs)
master->set_cs = dws->set_cs;
+ pm_runtime_enable(dev);
+ pm_runtime_get_sync(dev);
+
/* Basic HW init */
spi_hw_init(dev, dws);
--
2.7.4
Powered by blists - more mailing lists