On Mon, Oct 16, 2017 at 5:27 PM, Geert Uytterhoeven <geert+renesas@xxxxxxxxx> wrote: > 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 resume. > > This series consists of 4 parts: > - Patches 1-2 are cleanups, > - Patches 3-9 introduce a generic way to describe bias (pull-up/down) > registers, and converts the R-Car Gen3 and R-Car M1A bias support > over, > - Patches 10-13 introduce a generic way to describe various IOCTRL > registers, and converts the R-Car Gen3 I/O voltage support over, > - Patch 14 implements the actual suspend/resume code, using the > generic bias and IOCTRL support introduced earlier. > > 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. > > Due to the more compact description of bias registers, this series > actually decreases kernel size (by ca. 112 bytes for renesas_defconfig, > and ca. 60 bytes for shmobile_defconfig). > > Changes compared to v1: > - Add Reviewed-by, > - Shorten sh_pfc_{read,write}_reg() function names to > sh_pfc_{read,write}(), > - Use ARRAY_SIZE() instead of hardcoded constant 32, > - Add curly braces to nested for statements, > - Add a sentinel comment, to make it more explicit that a last zero > entry is required in sh_pfc_soc_info.bias_regs[] arrays, > > I plan to queue this in sh-pfc-for-v4.15. Done. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html