mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
spi: rockchip: set pinctrl state when suspend and resume
Change-Id: I3bfd641513dc8ad0112cb718383eb458c7659a84 Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user