|
@@ -17,6 +17,7 @@
|
|
|
#include <linux/dmaengine.h>
|
|
#include <linux/dmaengine.h>
|
|
|
#include <linux/module.h>
|
|
#include <linux/module.h>
|
|
|
#include <linux/of.h>
|
|
#include <linux/of.h>
|
|
|
|
|
+#include <linux/pinctrl/consumer.h>
|
|
|
#include <linux/platform_device.h>
|
|
#include <linux/platform_device.h>
|
|
|
#include <linux/spi/spi.h>
|
|
#include <linux/spi/spi.h>
|
|
|
#include <linux/pm_runtime.h>
|
|
#include <linux/pm_runtime.h>
|
|
@@ -843,6 +844,8 @@ static int rockchip_spi_suspend(struct device *dev)
|
|
|
clk_disable_unprepare(rs->apb_pclk);
|
|
clk_disable_unprepare(rs->apb_pclk);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ pinctrl_pm_select_sleep_state(dev);
|
|
|
|
|
+
|
|
|
return ret;
|
|
return ret;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -852,6 +855,8 @@ static int rockchip_spi_resume(struct device *dev)
|
|
|
struct spi_master *master = dev_get_drvdata(dev);
|
|
struct spi_master *master = dev_get_drvdata(dev);
|
|
|
struct rockchip_spi *rs = spi_master_get_devdata(master);
|
|
struct rockchip_spi *rs = spi_master_get_devdata(master);
|
|
|
|
|
|
|
|
|
|
+ pinctrl_pm_select_default_state(dev);
|
|
|
|
|
+
|
|
|
if (!pm_runtime_suspended(dev)) {
|
|
if (!pm_runtime_suspended(dev)) {
|
|
|
ret = clk_prepare_enable(rs->apb_pclk);
|
|
ret = clk_prepare_enable(rs->apb_pclk);
|
|
|
if (ret < 0)
|
|
if (ret < 0)
|