diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2013-01-24 07:16:28 -0500 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2013-01-27 19:54:19 -0500 |
commit | f3347b7a33512d55e11de419be335b7d8de9a572 (patch) | |
tree | 54582bf2173e8f5f5f0c77361a931b408142d57d /arch/arm/mach-shmobile/board-ag5evm.c | |
parent | 42dd581bc4dba82e8756bb881fa974742250b4c6 (diff) |
ARM: shmobile: ag5evm: Use gpio_request_one()
Replace occurences of gpio_request() and gpio_direction_*() by calls to
gpio_request_one().
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'arch/arm/mach-shmobile/board-ag5evm.c')
-rw-r--r-- | arch/arm/mach-shmobile/board-ag5evm.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c index 032d10817e79..5e7fe157f5a6 100644 --- a/arch/arm/mach-shmobile/board-ag5evm.c +++ b/arch/arm/mach-shmobile/board-ag5evm.c | |||
@@ -479,11 +479,10 @@ static void ag5evm_sdhi1_set_pwr(struct platform_device *pdev, int state) | |||
479 | static int power_gpio = -EINVAL; | 479 | static int power_gpio = -EINVAL; |
480 | 480 | ||
481 | if (power_gpio < 0) { | 481 | if (power_gpio < 0) { |
482 | int ret = gpio_request(GPIO_PORT114, "sdhi1_power"); | 482 | int ret = gpio_request_one(GPIO_PORT114, GPIOF_OUT_INIT_LOW, |
483 | if (!ret) { | 483 | "sdhi1_power"); |
484 | if (!ret) | ||
484 | power_gpio = GPIO_PORT114; | 485 | power_gpio = GPIO_PORT114; |
485 | gpio_direction_output(power_gpio, 0); | ||
486 | } | ||
487 | } | 486 | } |
488 | 487 | ||
489 | /* | 488 | /* |
@@ -604,14 +603,11 @@ static void __init ag5evm_init(void) | |||
604 | gpio_request(GPIO_FN_MMCD0_5_PU, NULL); | 603 | gpio_request(GPIO_FN_MMCD0_5_PU, NULL); |
605 | gpio_request(GPIO_FN_MMCD0_6_PU, NULL); | 604 | gpio_request(GPIO_FN_MMCD0_6_PU, NULL); |
606 | gpio_request(GPIO_FN_MMCD0_7_PU, NULL); | 605 | gpio_request(GPIO_FN_MMCD0_7_PU, NULL); |
607 | gpio_request(GPIO_PORT208, NULL); /* Reset */ | 606 | gpio_request_one(GPIO_PORT208, GPIOF_OUT_INIT_HIGH, NULL); /* Reset */ |
608 | gpio_direction_output(GPIO_PORT208, 1); | ||
609 | 607 | ||
610 | /* enable SMSC911X */ | 608 | /* enable SMSC911X */ |
611 | gpio_request(GPIO_PORT144, NULL); /* PINTA2 */ | 609 | gpio_request_one(GPIO_PORT144, GPIOF_IN, NULL); /* PINTA2 */ |
612 | gpio_direction_input(GPIO_PORT144); | 610 | gpio_request_one(GPIO_PORT145, GPIOF_OUT_INIT_HIGH, NULL); /* RESET */ |
613 | gpio_request(GPIO_PORT145, NULL); /* RESET */ | ||
614 | gpio_direction_output(GPIO_PORT145, 1); | ||
615 | 611 | ||
616 | /* FSI A */ | 612 | /* FSI A */ |
617 | gpio_request(GPIO_FN_FSIACK, NULL); | 613 | gpio_request(GPIO_FN_FSIACK, NULL); |
@@ -626,15 +622,13 @@ static void __init ag5evm_init(void) | |||
626 | gpio_request(GPIO_FN_PORT243_IRDA_FIRSEL, NULL); | 622 | gpio_request(GPIO_FN_PORT243_IRDA_FIRSEL, NULL); |
627 | 623 | ||
628 | /* LCD panel */ | 624 | /* LCD panel */ |
629 | gpio_request(GPIO_PORT217, NULL); /* RESET */ | 625 | gpio_request_one(GPIO_PORT217, GPIOF_OUT_INIT_LOW, NULL); /* RESET */ |
630 | gpio_direction_output(GPIO_PORT217, 0); | ||
631 | mdelay(1); | 626 | mdelay(1); |
632 | gpio_set_value(GPIO_PORT217, 1); | 627 | gpio_set_value(GPIO_PORT217, 1); |
633 | mdelay(100); | 628 | mdelay(100); |
634 | 629 | ||
635 | /* LCD backlight controller */ | 630 | /* LCD backlight controller */ |
636 | gpio_request(GPIO_PORT235, NULL); /* RESET */ | 631 | gpio_request_one(GPIO_PORT235, GPIOF_OUT_INIT_LOW, NULL); /* RESET */ |
637 | gpio_direction_output(GPIO_PORT235, 0); | ||
638 | lcd_backlight_set_brightness(0); | 632 | lcd_backlight_set_brightness(0); |
639 | 633 | ||
640 | /* enable SDHI0 on CN15 [SD I/F] */ | 634 | /* enable SDHI0 on CN15 [SD I/F] */ |