spi: s3c24xx: Add missing spi_master_{resume,suspend} calls to PM callbacks
Subsystems (3)
PATCH 1/2 spi: s3c24xx: Add missing spi_master_{resume,suspend} calls to PM callbacks
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.
--- drivers/spi/spi-s3c24xx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/spi/spi-s3c24xx.c +6 -1
@@ -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 = {
Signature · 8 lines
1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 2/2 spi: sirf: Add missing spi_master_{resume,suspend} calls to PM callbacks
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.
--- drivers/spi/spi-sirf.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/spi/spi-sirf.c +6 -1
@@ -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
Signature · 8 lines
1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Mark Brown
AppliedRe: [RFT][PATCH 2/2] spi: sirf: Add missing spi_master_{resume,suspend} calls to PM callbacks
Quoted 3 lines · Axel Lin
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_resumeto stop/start the queue while suspend/resume.
Applied, thanks.
Mark Brown
AppliedQuoted 3 lines · Axel Lin
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_resumeto start/stop the queue while suspend/resume.
Applied, thanks.