Commit 432a17d7 authored by Mirza Krak's avatar Mirza Krak Committed by Mark Brown

spi: fsl-dspi: Use pinctrl PM helpers

Add support for "sleep" state of pinctrl.
Signed-off-by: default avatarMirza Krak <mirza.krak@hostmobility.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent c042af95
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_device.h> #include <linux/of_device.h>
#include <linux/pinctrl/consumer.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/pm_runtime.h> #include <linux/pm_runtime.h>
#include <linux/regmap.h> #include <linux/regmap.h>
...@@ -613,6 +614,8 @@ static int dspi_suspend(struct device *dev) ...@@ -613,6 +614,8 @@ static int dspi_suspend(struct device *dev)
spi_master_suspend(master); spi_master_suspend(master);
clk_disable_unprepare(dspi->clk); clk_disable_unprepare(dspi->clk);
pinctrl_pm_select_sleep_state(dev);
return 0; return 0;
} }
...@@ -621,6 +624,8 @@ static int dspi_resume(struct device *dev) ...@@ -621,6 +624,8 @@ static int dspi_resume(struct device *dev)
struct spi_master *master = dev_get_drvdata(dev); struct spi_master *master = dev_get_drvdata(dev);
struct fsl_dspi *dspi = spi_master_get_devdata(master); struct fsl_dspi *dspi = spi_master_get_devdata(master);
pinctrl_pm_select_default_state(dev);
clk_prepare_enable(dspi->clk); clk_prepare_enable(dspi->clk);
spi_master_resume(master); spi_master_resume(master);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment