kernel_optimize_test/drivers/gpio
Jon Hunter 352a2d5bfc gpio/omap: ensure gpio context is initialised
Commit a2797be (gpio/omap: force restore if context loss is not
detectable) broke gpio support for OMAP when booting with device-tree
because a restore of the gpio context being performed without ever
initialising the gpio context. In other words, the context restored was
bad.

This problem could also occur in the non device-tree case, however, it
is much less likely because when booting without device-tree we can
detect context loss via a platform specific API and so context restore
is performed less often.

Nevertheless we should ensure that the gpio context is initialised
on the first pm-runtime resume for gpio banks that could lose their
state regardless of whether we are booting with device-tree or not.

The context loss count was being initialised on the first pm-runtime
suspend following a resume, by populating the get_count_loss_count()
function pointer after the first pm-runtime resume. To make the code
more readable and logical, initialise the context loss count on the
first pm-runtime resume if the context is not yet valid.

Reported-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Acked-by: Santosh Shilimkar<santosh.shilimkar@ti.com>
Reviewed-by: Kevin Hilman <khilman@linaro.org>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-05-13 21:20:44 +02:00
..
devres.c
gpio-74x164.c
gpio-adnp.c
gpio-adp5520.c
gpio-adp5588.c
gpio-amd8111.c
gpio-arizona.c
gpio-bt8xx.c
gpio-clps711x.c
gpio-cs5535.c
gpio-da9052.c
gpio-da9055.c
gpio-davinci.c
gpio-em.c
gpio-ep93xx.c
gpio-ge.c
gpio-generic.c
gpio-grgpio.c gpio: grgpio: Add irq support 2013-04-26 08:52:38 +02:00
gpio-ich.c GPIO changes for Linux 3.10 2013-05-06 15:40:55 -07:00
gpio-it8761e.c
gpio-janz-ttl.c
gpio-ks8695.c
gpio-langwell.c
gpio-lpc32xx.c Removal of GENERIC_GPIO for v3.10 2013-05-09 09:59:16 -07:00
gpio-lynxpoint.c
gpio-max730x.c
gpio-max732x.c
gpio-max7300.c
gpio-max7301.c
gpio-mc9s08dz60.c
gpio-mc33880.c
gpio-mcp23s08.c
gpio-ml-ioh.c
gpio-mm-lantiq.c
gpio-mpc8xxx.c
gpio-mpc5200.c
gpio-msic.c
gpio-msm-v1.c
gpio-msm-v2.c
gpio-mvebu.c GPIO changes for Linux 3.10 2013-05-06 15:40:55 -07:00
gpio-mxc.c
gpio-mxs.c
gpio-omap.c gpio/omap: ensure gpio context is initialised 2013-05-13 21:20:44 +02:00
gpio-palmas.c
gpio-pca953x.c GPIO changes for Linux 3.10 2013-05-06 15:40:55 -07:00
gpio-pcf857x.c
gpio-pch.c
gpio-pl061.c ARM: arm-soc cleanup for 3.10 2013-05-02 09:03:55 -07:00
gpio-pxa.c GPIO changes for Linux 3.10 2013-05-06 15:40:55 -07:00
gpio-rc5t583.c
gpio-rcar.c
gpio-rdc321x.c
gpio-sa1100.c
gpio-samsung.c GPIO changes for Linux 3.10 2013-05-06 15:40:55 -07:00
gpio-sch.c
gpio-sodaville.c
gpio-spear-spics.c
gpio-sta2x11.c
gpio-stmpe.c
gpio-stp-xway.c
gpio-sx150x.c
gpio-tc3589x.c
gpio-tegra.c GPIO changes for Linux 3.10 2013-05-06 15:40:55 -07:00
gpio-timberdale.c
gpio-tnetv107x.c
gpio-tps6586x.c
gpio-tps65910.c
gpio-tps65912.c
gpio-ts5500.c
gpio-twl4030.c
gpio-twl6040.c
gpio-ucb1400.c mfd: ucb1400: Pass ucb1400-gpio data through ac97 bus 2013-04-19 00:40:07 +02:00
gpio-viperboard.c
gpio-vr41xx.c
gpio-vx855.c
gpio-wm831x.c
gpio-wm8350.c
gpio-wm8994.c
gpio-xilinx.c
gpiolib-acpi.c
gpiolib-of.c GPIO changes for Linux 3.10 2013-05-06 15:40:55 -07:00
gpiolib.c
Kconfig Removal of GENERIC_GPIO for v3.10 2013-05-09 09:59:16 -07:00
Makefile ARM: arm-soc platform updates for 3.10, part 2 2013-05-07 10:57:51 -07:00