From: Huibin Hong Date: Wed, 24 Aug 2016 09:10:57 +0000 (+0800) Subject: spi: rockchip: set pinctrl state when suspend and resume X-Git-Tag: firefly_0821_release~1663 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3510d70d3e1fcbf00afccf96c4351609bf4075bc;p=firefly-linux-kernel-4.4.55.git spi: rockchip: set pinctrl state when suspend and resume Change-Id: I3bfd641513dc8ad0112cb718383eb458c7659a84 Signed-off-by: Huibin Hong --- diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c index 9e86ec35c450..42c8fcd82758 100644 --- a/drivers/spi/spi-rockchip.c +++ b/drivers/spi/spi-rockchip.c @@ -813,6 +813,8 @@ static int rockchip_spi_suspend(struct device *dev) clk_disable_unprepare(rs->apb_pclk); } + pinctrl_pm_select_sleep_state(dev); + return ret; } @@ -822,6 +824,8 @@ static int rockchip_spi_resume(struct device *dev) struct spi_master *master = dev_get_drvdata(dev); struct rockchip_spi *rs = spi_master_get_devdata(master); + pinctrl_pm_select_default_state(dev); + if (!pm_runtime_suspended(dev)) { ret = clk_prepare_enable(rs->apb_pclk); if (ret < 0)