summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/sh-pfc/sh_pfc.h
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2017-09-29 15:17:18 +0300
committerGeert Uytterhoeven <geert+renesas@glider.be>2017-10-20 12:37:43 +0300
commit8843797df383ac7ed7cf4f87cc18a4ec6d929b60 (patch)
treee222667cdfac734913731ece272a7665f30dbed3 /drivers/pinctrl/sh-pfc/sh_pfc.h
parent3870a6f6ac255340767de64e71fbbfc54eb39403 (diff)
downloadlinux-8843797df383ac7ed7cf4f87cc18a4ec6d929b60.tar.xz
pinctrl: sh-pfc: Save/restore registers for PSCI system suspend
During PSCI system suspend, R-Car Gen3 SoCs are powered down, and their pinctrl register state is lost. Note that as the boot loader skips most initialization after system resume, pinctrl register state differs from the state encountered during normal system boot, too. To fix this, save all GPIO and peripheral function select, module select, drive strength control, bias, and other I/O control registers during system suspend, and restore them during system resume. Note that to avoid overhead on platforms not needing it, the suspend/resume code has a build time dependency on sleep and PSCI support, and a runtime dependency on PSCI. Inspired by a patch in the BSP by Hien Dang. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Diffstat (limited to 'drivers/pinctrl/sh-pfc/sh_pfc.h')
-rw-r--r--drivers/pinctrl/sh-pfc/sh_pfc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pinctrl/sh-pfc/sh_pfc.h b/drivers/pinctrl/sh-pfc/sh_pfc.h
index b9bb56c91b6f..213108a058fe 100644
--- a/drivers/pinctrl/sh-pfc/sh_pfc.h
+++ b/drivers/pinctrl/sh-pfc/sh_pfc.h
@@ -222,6 +222,7 @@ struct sh_pfc {
unsigned int nr_gpio_pins;
struct sh_pfc_chip *gpio;
+ u32 *saved_regs;
};
struct sh_pfc_soc_operations {