* [RFT][PATCH 1/2] spi: s3c24xx: Add missing spi_master_{resume,suspend} calls to PM callbacks
@ 2014-03-05 7:17 Axel Lin
2014-03-05 7:19 ` [RFT][PATCH 2/2] spi: sirf: " Axel Lin
2014-03-07 5:59 ` [RFT][PATCH 1/2] spi: s3c24xx: " Mark Brown
0 siblings, 2 replies; 4+ messages in thread
From: Axel Lin @ 2014-03-05 7:17 UTC (permalink / raw)
To: Mark Brown
Cc: Ben Dooks, Kukjin Kim, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
linux-spi-u79uwXL29TY76Z2rM5mHXA
This is required since commit 2025172e3280 "spi/bitbang: Use core message pump".
spi-bitbang now uses core message pump, so it needs to call spi_master_suspend/
spi_master_resume to start/stop the queue while suspend/resume.
Signed-off-by: Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
---
drivers/spi/spi-s3c24xx.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/spi-s3c24xx.c b/drivers/spi/spi-s3c24xx.c
index a275445..bed2338 100644
--- a/drivers/spi/spi-s3c24xx.c
+++ b/drivers/spi/spi-s3c24xx.c
@@ -633,6 +633,11 @@ static int s3c24xx_spi_remove(struct platform_device *dev)
static int s3c24xx_spi_suspend(struct device *dev)
{
struct s3c24xx_spi *hw = dev_get_drvdata(dev);
+ int ret;
+
+ ret = spi_master_suspend(hw->master);
+ if (ret)
+ return ret;
if (hw->pdata && hw->pdata->gpio_setup)
hw->pdata->gpio_setup(hw->pdata, 0);
@@ -646,7 +651,7 @@ static int s3c24xx_spi_resume(struct device *dev)
struct s3c24xx_spi *hw = dev_get_drvdata(dev);
s3c24xx_spi_initialsetup(hw);
- return 0;
+ return spi_master_resume(hw->master);
}
static const struct dev_pm_ops s3c24xx_spi_pmops = {
--
1.8.1.2
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [RFT][PATCH 2/2] spi: sirf: Add missing spi_master_{resume,suspend} calls to PM callbacks
2014-03-05 7:17 [RFT][PATCH 1/2] spi: s3c24xx: Add missing spi_master_{resume,suspend} calls to PM callbacks Axel Lin
@ 2014-03-05 7:19 ` Axel Lin
2014-03-13 9:57 ` Mark Brown
2014-03-07 5:59 ` [RFT][PATCH 1/2] spi: s3c24xx: " Mark Brown
1 sibling, 1 reply; 4+ messages in thread
From: Axel Lin @ 2014-03-05 7:19 UTC (permalink / raw)
To: Mark Brown; +Cc: Barry Song, linux-spi-u79uwXL29TY76Z2rM5mHXA
This is required since commit 2025172e3280 "spi/bitbang: Use core message pump".
spi-bitbang now uses core message pump, so it needs to call spi_master_suspend/
spi_master_resume to stop/start the queue while suspend/resume.
Signed-off-by: Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
---
drivers/spi/spi-sirf.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/spi-sirf.c b/drivers/spi/spi-sirf.c
index a72b8f8..1a77ad5 100644
--- a/drivers/spi/spi-sirf.c
+++ b/drivers/spi/spi-sirf.c
@@ -748,6 +748,11 @@ static int spi_sirfsoc_suspend(struct device *dev)
{
struct spi_master *master = dev_get_drvdata(dev);
struct sirfsoc_spi *sspi = spi_master_get_devdata(master);
+ int ret;
+
+ ret = spi_master_suspend(master);
+ if (ret)
+ return ret;
clk_disable(sspi->clk);
return 0;
@@ -764,7 +769,7 @@ static int spi_sirfsoc_resume(struct device *dev)
writel(SIRFSOC_SPI_FIFO_START, sspi->base + SIRFSOC_SPI_RXFIFO_OP);
writel(SIRFSOC_SPI_FIFO_START, sspi->base + SIRFSOC_SPI_TXFIFO_OP);
- return 0;
+ return spi_master_resume(master);
}
#endif
--
1.8.1.2
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [RFT][PATCH 2/2] spi: sirf: Add missing spi_master_{resume,suspend} calls to PM callbacks
2014-03-05 7:19 ` [RFT][PATCH 2/2] spi: sirf: " Axel Lin
@ 2014-03-13 9:57 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2014-03-13 9:57 UTC (permalink / raw)
To: Axel Lin; +Cc: Barry Song, linux-spi-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 307 bytes --]
On Wed, Mar 05, 2014 at 03:19:09PM +0800, Axel Lin wrote:
> This is required since commit 2025172e3280 "spi/bitbang: Use core message pump".
> spi-bitbang now uses core message pump, so it needs to call spi_master_suspend/
> spi_master_resume to stop/start the queue while suspend/resume.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFT][PATCH 1/2] spi: s3c24xx: Add missing spi_master_{resume,suspend} calls to PM callbacks
2014-03-05 7:17 [RFT][PATCH 1/2] spi: s3c24xx: Add missing spi_master_{resume,suspend} calls to PM callbacks Axel Lin
2014-03-05 7:19 ` [RFT][PATCH 2/2] spi: sirf: " Axel Lin
@ 2014-03-07 5:59 ` Mark Brown
1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2014-03-07 5:59 UTC (permalink / raw)
To: Axel Lin
Cc: Ben Dooks, Kukjin Kim, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
linux-spi-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 307 bytes --]
On Wed, Mar 05, 2014 at 03:17:23PM +0800, Axel Lin wrote:
> This is required since commit 2025172e3280 "spi/bitbang: Use core message pump".
> spi-bitbang now uses core message pump, so it needs to call spi_master_suspend/
> spi_master_resume to start/stop the queue while suspend/resume.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-03-13 9:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-05 7:17 [RFT][PATCH 1/2] spi: s3c24xx: Add missing spi_master_{resume,suspend} calls to PM callbacks Axel Lin
2014-03-05 7:19 ` [RFT][PATCH 2/2] spi: sirf: " Axel Lin
2014-03-13 9:57 ` Mark Brown
2014-03-07 5:59 ` [RFT][PATCH 1/2] spi: s3c24xx: " Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).