aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/board-mackerel.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-02-16 01:38:50 -0500
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-03-15 08:33:40 -0400
commit6d170aa0116ed9f43d765fea47daeb7afb3a87fe (patch)
treeb6f9d84a94b3a516dfbba290e3a725023c7bb85d /arch/arm/mach-shmobile/board-mackerel.c
parent8c2a141eece6196ee5f236cf0ac13c6e2828b0a8 (diff)
ARM: shmobile: mackerel: Replace GPIO_PORTx enum with GPIO port numbers
The PFC GPIO API implementation moved to using port numbers. Replace all GPIO_PORTx enum usage with the corresponding port number. The GPIO_PORTx enum values are identical to the port number on this platform. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-shmobile/board-mackerel.c')
-rw-r--r--arch/arm/mach-shmobile/board-mackerel.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index db968a585ff0..172d47216c91 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -363,7 +363,7 @@ static struct fb_videomode mackerel_lcdc_modes[] = {
363 363
364static int mackerel_set_brightness(int brightness) 364static int mackerel_set_brightness(int brightness)
365{ 365{
366 gpio_set_value(GPIO_PORT31, brightness); 366 gpio_set_value(31, brightness);
367 367
368 return 0; 368 return 0;
369} 369}
@@ -819,22 +819,22 @@ static struct platform_device usbhs1_device = {
819static struct gpio_led mackerel_leds[] = { 819static struct gpio_led mackerel_leds[] = {
820 { 820 {
821 .name = "led0", 821 .name = "led0",
822 .gpio = GPIO_PORT0, 822 .gpio = 0,
823 .default_state = LEDS_GPIO_DEFSTATE_ON, 823 .default_state = LEDS_GPIO_DEFSTATE_ON,
824 }, 824 },
825 { 825 {
826 .name = "led1", 826 .name = "led1",
827 .gpio = GPIO_PORT1, 827 .gpio = 1,
828 .default_state = LEDS_GPIO_DEFSTATE_ON, 828 .default_state = LEDS_GPIO_DEFSTATE_ON,
829 }, 829 },
830 { 830 {
831 .name = "led2", 831 .name = "led2",
832 .gpio = GPIO_PORT2, 832 .gpio = 2,
833 .default_state = LEDS_GPIO_DEFSTATE_ON, 833 .default_state = LEDS_GPIO_DEFSTATE_ON,
834 }, 834 },
835 { 835 {
836 .name = "led3", 836 .name = "led3",
837 .gpio = GPIO_PORT159, 837 .gpio = 159,
838 .default_state = LEDS_GPIO_DEFSTATE_ON, 838 .default_state = LEDS_GPIO_DEFSTATE_ON,
839 } 839 }
840}; 840};
@@ -964,11 +964,11 @@ static struct platform_device nand_flash_device = {
964 964
965/* 965/*
966 * The card detect pin of the top SD/MMC slot (CN7) is active low and is 966 * The card detect pin of the top SD/MMC slot (CN7) is active low and is
967 * connected to GPIO A22 of SH7372 (GPIO_PORT41). 967 * connected to GPIO A22 of SH7372 (GPIO 41).
968 */ 968 */
969static int slot_cn7_get_cd(struct platform_device *pdev) 969static int slot_cn7_get_cd(struct platform_device *pdev)
970{ 970{
971 return !gpio_get_value(GPIO_PORT41); 971 return !gpio_get_value(41);
972} 972}
973 973
974/* SDHI0 */ 974/* SDHI0 */
@@ -977,7 +977,7 @@ static struct sh_mobile_sdhi_info sdhi0_info = {
977 .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, 977 .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX,
978 .tmio_flags = TMIO_MMC_USE_GPIO_CD, 978 .tmio_flags = TMIO_MMC_USE_GPIO_CD,
979 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ, 979 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ,
980 .cd_gpio = GPIO_PORT172, 980 .cd_gpio = 172,
981}; 981};
982 982
983static struct resource sdhi0_resources[] = { 983static struct resource sdhi0_resources[] = {
@@ -1060,11 +1060,11 @@ static struct platform_device sdhi1_device = {
1060 1060
1061/* 1061/*
1062 * The card detect pin of the top SD/MMC slot (CN23) is active low and is 1062 * The card detect pin of the top SD/MMC slot (CN23) is active low and is
1063 * connected to GPIO SCIFB_SCK of SH7372 (GPIO_PORT162). 1063 * connected to GPIO SCIFB_SCK of SH7372 (162).
1064 */ 1064 */
1065static int slot_cn23_get_cd(struct platform_device *pdev) 1065static int slot_cn23_get_cd(struct platform_device *pdev)
1066{ 1066{
1067 return !gpio_get_value(GPIO_PORT162); 1067 return !gpio_get_value(162);
1068} 1068}
1069 1069
1070/* SDHI2 */ 1070/* SDHI2 */
@@ -1403,9 +1403,9 @@ static void __init mackerel_init(void)
1403 gpio_request(GPIO_FN_LCDDCK, NULL); 1403 gpio_request(GPIO_FN_LCDDCK, NULL);
1404 1404
1405 /* backlight, off by default */ 1405 /* backlight, off by default */
1406 gpio_request_one(GPIO_PORT31, GPIOF_OUT_INIT_LOW, NULL); 1406 gpio_request_one(31, GPIOF_OUT_INIT_LOW, NULL);
1407 1407
1408 gpio_request_one(GPIO_PORT151, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */ 1408 gpio_request_one(151, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */
1409 1409
1410 /* USBHS0 */ 1410 /* USBHS0 */
1411 gpio_request(GPIO_FN_VBUS0_0, NULL); 1411 gpio_request(GPIO_FN_VBUS0_0, NULL);
@@ -1421,10 +1421,10 @@ static void __init mackerel_init(void)
1421 gpio_request(GPIO_FN_FSIAILR, NULL); 1421 gpio_request(GPIO_FN_FSIAILR, NULL);
1422 gpio_request(GPIO_FN_FSIAISLD, NULL); 1422 gpio_request(GPIO_FN_FSIAISLD, NULL);
1423 gpio_request(GPIO_FN_FSIAOSLD, NULL); 1423 gpio_request(GPIO_FN_FSIAOSLD, NULL);
1424 gpio_request_one(GPIO_PORT161, GPIOF_OUT_INIT_LOW, NULL); /* slave */ 1424 gpio_request_one(161, GPIOF_OUT_INIT_LOW, NULL); /* slave */
1425 1425
1426 gpio_request(GPIO_PORT9, NULL); 1426 gpio_request(9, NULL);
1427 gpio_request(GPIO_PORT10, NULL); 1427 gpio_request(10, NULL);
1428 gpio_direction_none(GPIO_PORT9CR); /* FSIAOBT needs no direction */ 1428 gpio_direction_none(GPIO_PORT9CR); /* FSIAOBT needs no direction */
1429 gpio_direction_none(GPIO_PORT10CR); /* FSIAOLR needs no direction */ 1429 gpio_direction_none(GPIO_PORT10CR); /* FSIAOLR needs no direction */
1430 1430
@@ -1475,7 +1475,7 @@ static void __init mackerel_init(void)
1475 gpio_request(GPIO_FN_SDHID1_0, NULL); 1475 gpio_request(GPIO_FN_SDHID1_0, NULL);
1476#endif 1476#endif
1477 /* card detect pin for MMC slot (CN7) */ 1477 /* card detect pin for MMC slot (CN7) */
1478 gpio_request_one(GPIO_PORT41, GPIOF_IN, NULL); 1478 gpio_request_one(41, GPIOF_IN, NULL);
1479 1479
1480 /* enable SDHI2 */ 1480 /* enable SDHI2 */
1481 gpio_request(GPIO_FN_SDHICMD2, NULL); 1481 gpio_request(GPIO_FN_SDHICMD2, NULL);
@@ -1486,7 +1486,7 @@ static void __init mackerel_init(void)
1486 gpio_request(GPIO_FN_SDHID2_0, NULL); 1486 gpio_request(GPIO_FN_SDHID2_0, NULL);
1487 1487
1488 /* card detect pin for microSD slot (CN23) */ 1488 /* card detect pin for microSD slot (CN23) */
1489 gpio_request_one(GPIO_PORT162, GPIOF_IN, NULL); 1489 gpio_request_one(162, GPIOF_IN, NULL);
1490 1490
1491 /* MMCIF */ 1491 /* MMCIF */
1492 gpio_request(GPIO_FN_MMCD0_0, NULL); 1492 gpio_request(GPIO_FN_MMCD0_0, NULL);