summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-cadence.c
diff options
context:
space:
mode:
authorShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>2017-08-08 11:00:03 +0200
committerMark Brown <broonie@kernel.org>2017-08-08 10:43:41 +0100
commit802740890c4200c9266aee3139c5bd8e9b154e8f (patch)
tree0768049555060dc79eb07cebc015b65d96d47aad /drivers/spi/spi-cadence.c
parent48767fd8982d39d90a9e83b1461dc5feedf73e29 (diff)
downloadlinux-802740890c4200c9266aee3139c5bd8e9b154e8f.tar.bz2
spi: cadence: Add support for context loss
Context could be lost across the suspend and resume. Reinit the driver to tide over. Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-cadence.c')
-rw-r--r--drivers/spi/spi-cadence.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/spi/spi-cadence.c b/drivers/spi/spi-cadence.c
index 5e02f9b91688..5c9516ae4942 100644
--- a/drivers/spi/spi-cadence.c
+++ b/drivers/spi/spi-cadence.c
@@ -704,7 +704,9 @@ static int __maybe_unused cdns_spi_resume(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct spi_master *master = platform_get_drvdata(pdev);
+ struct cdns_spi *xspi = spi_master_get_devdata(master);
+ cdns_spi_init_hw(xspi);
return spi_master_resume(master);
}