From 432a17d77a77009736f4dce84d3386398665fd29 Mon Sep 17 00:00:00 2001 From: Mirza Krak Date: Fri, 12 Jun 2015 18:55:22 +0200 Subject: [PATCH] spi: fsl-dspi: Use pinctrl PM helpers Add support for "sleep" state of pinctrl. Signed-off-by: Mirza Krak Signed-off-by: Mark Brown --- drivers/spi/spi-fsl-dspi.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c index 451a837e5613..86bcdd68c1fe 100644 --- a/drivers/spi/spi-fsl-dspi.c +++ b/drivers/spi/spi-fsl-dspi.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -613,6 +614,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; } @@ -621,6 +624,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); -- 2.20.1