]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
commit8843797df383ac7ed7cf4f87cc18a4ec6d929b60
treee222667cdfac734913731ece272a7665f30dbed3
parent3870a6f6ac255340767de64e71fbbfc54eb39403
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