We are using PSP 04.06.00.11. Our 5V regulator is controlled by gpio1_8. Gpio bank 1 looses context during suspend and it isn't restored correctly on resume. There does appear to be some context restore related functions in gpio-omap.c but they are targeted for the OMAP3 processors.
There are a series of commits that seem to have been meant to fix this but they were all reverted without any comment on why.
- arm:omap:gpio - Handle Clocks properly in Suspend/Resume
- Revert "arm:omap:gpio - Handle Clocks properly in Suspend/Resume"
- gpio/omap: use flag to identify wakeup domain
- gpio/omap: handle save/restore context in GPIO driver
- gpio/omap: fix invalid context restore of gpio bank-0
- gpio/omap: save and restore debounce registers
- Revert "gpio/omap: save and restore debounce registers"
- Revert "gpio/omap: fix invalid context restore of gpio bank-0"
- Revert "gpio/omap: handle save/restore context in GPIO driver"
- Revert "gpio/omap: use flag to identify wakeup domain"
Author: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Committer: Vishveshwar Bhat <vishveshwar.bhat@ti.com>
Register differences from before sleep to after resume
GPIO1
GPIO_SYSCONFIG
-0x4804C010 - 0x0000001D +0x4804C010 - 0x00000000
0h = Force-idle. An idle request is acknowledged unconditionally
0h = Wakeup generation is disabled.
0h = Internal Interface OCP clock is free-running
GPIO_SYSSTAT
-0x4804C114 - 0x00000001 +0x4804C114 - 0x00000000
0h = Internal Reset is on-going.
GPIO_CTRL
-0x4804C130 - 0x00000000 +0x4804C130 - 0x00000002
1h = Functional clock is interface clock divided by 2.
GPIO_OE
-0x4804C134 - 0xFE7D0EFF +0x4804C134 - 0xFFFFFFFF
1h = The corresponding GPIO port is configured as an input.
GPIO_DATAIN
-0x4804C138 - 0x00410200 +0x4804C138 - 0x00010200
Sampled Input Data
GPIO2
-0x481AC010 - 0x0000001D +0x481AC010 - 0x00000000 -0x481AC114 - 0x00000001 +0x481AC114 - 0x00000000 -0x481AC130 - 0x00000000 +0x481AC130 - 0x00000002 -0x481AC134 - 0xFFEFFFFF +0x481AC134 - 0xFFFFFFFF
GPIO3
-0x481AE010 - 0x0000001D +0x481AE010 - 0x00000000 -0x481AE114 - 0x00000001 +0x481AE114 - 0x00000000 -0x481AE130 - 0x00000000 +0x481AE130 - 0x00000002