]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: sh-pfc: Save/restore registers for PSCI system suspend
authorGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 29 Sep 2017 12:17:18 +0000 (14:17 +0200)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 20 Oct 2017 09:37:43 +0000 (11:37 +0200)
commit62fee96d70516ecc25b2e8ab34e85f47dce8a55a
treee222667cdfac734913731ece272a7665f30dbed3
parent9491518d91f9c3ec5eb72f75d7cf92637129917d
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>
drivers/pinctrl/sh-pfc/core.c
drivers/pinctrl/sh-pfc/sh_pfc.h