Skip to content

Commit

Permalink
ARM: S3C24XX: Convert the PM code to gpiolib API
Browse files Browse the repository at this point in the history
Replace deprecated functions with the gpiolib ones.

Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
  • Loading branch information
Sylwester Nawrocki authored and Kukjin Kim committed Jul 13, 2012
1 parent 5c9fb56 commit 9491173
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions arch/arm/mach-s3c24xx/pm-s3c2410.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ static void s3c2410_pm_prepare(void)
__raw_writel(calc, phys_to_virt(H1940_SUSPEND_CHECKSUM));
}

if ( machine_is_aml_m5900() )
s3c2410_gpio_setpin(S3C2410_GPF(2), 1);
if (machine_is_aml_m5900()) {
gpio_request_one(S3C2410_GPF(2), GPIOF_OUT_INIT_HIGH, NULL);
gpio_free(S3C2410_GPF(2));
}

if (machine_is_rx1950()) {
/* According to S3C2442 user's manual, page 7-17,
Expand All @@ -103,8 +105,10 @@ static void s3c2410_pm_resume(void)
tmp &= S3C2410_GSTATUS2_OFFRESET;
__raw_writel(tmp, S3C2410_GSTATUS2);

if ( machine_is_aml_m5900() )
s3c2410_gpio_setpin(S3C2410_GPF(2), 0);
if (machine_is_aml_m5900()) {
gpio_request_one(S3C2410_GPF(2), GPIOF_OUT_INIT_LOW, NULL);
gpio_free(S3C2410_GPF(2));
}
}

struct syscore_ops s3c2410_pm_syscore_ops = {
Expand Down

0 comments on commit 9491173

Please sign in to comment.