]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
gpio: omap: Save and restore sysconfig
authorTony Lindgren <tony@atomide.com>
Sat, 17 Apr 2021 08:38:39 +0000 (11:38 +0300)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 7 May 2021 07:54:10 +0000 (09:54 +0200)
commit9bd0ae4f4d82e0b1331062dee92df374ae40f105
tree1cc1d407c063373f8aa90db20c406340959a170b
parentb09bd3a1953b35e308b7173597b2a373004f229b
gpio: omap: Save and restore sysconfig

BugLink: https://bugs.launchpad.net/bugs/1927535
[ Upstream commit ddd8d94ca31e768c76cf8bfe34ba7b10136b3694 ]

As we are using cpu_pm to save and restore context, we must also save and
restore the GPIO sysconfig register. This is needed because we are not
calling PM runtime functions at all with cpu_pm.

We need to save the sysconfig on idle as it's value can get reconfigured by
PM runtime and can be different from the init time value. Device specific
flags like "ti,no-idle-on-init" can affect the init value.

Fixes: b764a5863fd8 ("gpio: omap: Remove custom PM calls and use cpu_pm instead")
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Adam Ford <aford173@gmail.com>
Cc: Andreas Kemnade <andreas@kemnade.info>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/gpio/gpio-omap.c
include/linux/platform_data/gpio-omap.h