Fix GPIOs bank H and J not being preserved during suspend
Subsystems (3)
PATCH 1/1 Fix GPIOs bank H and J not being preserved during suspend
This patch adds bank H and J GPIOs (present on S3C244X CPUs) to the list of registers that must be saved/resumed during suspend.
Signed-off-by Christian Pellegrin <[email protected]>
--- arch/arm/mach-s3c2410/include/mach/gpio-core.h | 5 +++++ arch/arm/plat-s3c/pm-gpio.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-)
arch/arm/mach-s3c2410/include/mach/gpio-core.h +5 -0
@@ -24,8 +24,13 @@ static inline struct s3c_gpio_chip *s3c_gpiolib_getchip(unsigned int pin) {struct s3c_gpio_chip *chip; +#ifdef CONFIG_CPU_S3C244X +if (pin >S3C2410_GPJ (15 )) +return NULL ; +#else if (pin >S3C2410_GPG (10 ))return NULL ; +#endif chip = &s3c24xx_gpios[pin/32 ];return (S3C2410_GPIO_OFFSET (pin) < chip->chip.ngpio) ? chip :NULL ;
arch/arm/plat-s3c/pm-gpio.c +2 -2
@@ -343,7 +343,7 @@ void s3c_pm_save_gpios(void) ourchip->pm_save[2 ], ourchip->pm_save[3]); - gpio_nr += ourchip->chip.ngpio; + gpio_nr += ourchip->chip.ngpio -1 ; gpio_nr +=CONFIG_S3C_GPIO_SPACE ; } }
@@ -374,7 +374,7 @@ void s3c_pm_restore_gpios(void)s3c_pm_resume_gpio (ourchip); - gpio_nr += ourchip->chip.ngpio; + gpio_nr += ourchip->chip.ngpio -1 ; gpio_nr +=CONFIG_S3C_GPIO_SPACE ; } }
Signature · 1 line
1.5.6.5