diff mbox

[1/1] spi: fsl-dspi: Use pinctrl PM helpers

Message ID 1434103303-5120-1-git-send-email-mirza.krak@hostmobility.com (mailing list archive)
State Accepted
Commit 070eb3a913c577bd57d9393e6adad3629a6e036c
Headers show

Commit Message

Mirza Krak June 12, 2015, 10:01 a.m. UTC
From: Mirza Krak <mirza.krak@hostmobility.com>

Add support for "sleep" state of pinctrl.

Signed-off-by: Mirza Krak <mirza.krak@hostmobility.com>
---
 drivers/spi/spi-fsl-dspi.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Mark Brown June 12, 2015, 10:23 a.m. UTC | #1
On Fri, Jun 12, 2015 at 12:01:43PM +0200, Mirza Krak wrote:
> From: Mirza Krak <mirza.krak@hostmobility.com>
> 
> Add support for "sleep" state of pinctrl.

Applied, thanks.
Mark Brown June 12, 2015, 4:21 p.m. UTC | #2
On Fri, Jun 12, 2015 at 11:23:14AM +0100, Mark Brown wrote:
> On Fri, Jun 12, 2015 at 12:01:43PM +0200, Mirza Krak wrote:
> > From: Mirza Krak <mirza.krak@hostmobility.com>
> > 
> > Add support for "sleep" state of pinctrl.
> 
> Applied, thanks.

...and dropped because it caused build failures (due to a missing
header, please fix that and resubmit).
Mirza Krak June 12, 2015, 4:31 p.m. UTC | #3
And sorry for HTML format.
diff mbox

Patch

diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
index d1a39249704a..3e76eb710efd 100644
--- a/drivers/spi/spi-fsl-dspi.c
+++ b/drivers/spi/spi-fsl-dspi.c
@@ -429,6 +429,8 @@  static int dspi_suspend(struct device *dev)
 	spi_master_suspend(master);
 	clk_disable_unprepare(dspi->clk);
 
+	pinctrl_pm_select_sleep_state(dev);
+
 	return 0;
 }
 
@@ -437,6 +439,8 @@  static int dspi_resume(struct device *dev)
 	struct spi_master *master = dev_get_drvdata(dev);
 	struct fsl_dspi *dspi = spi_master_get_devdata(master);
 
+	pinctrl_pm_select_default_state(dev);
+
 	clk_prepare_enable(dspi->clk);
 	spi_master_resume(master);