aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-01-24 07:16:30 -0500
committerSimon Horman <horms+renesas@verge.net.au>2013-01-27 19:54:20 -0500
commit0f69e708159ded249fb73f8fe40508100a2cc54e (patch)
tree01e32a2191e04ce1f3f71ff2921b758538b2527e /arch/arm/mach-shmobile
parent5683eafdfd039681a0d30c402a0675b521313659 (diff)
ARM: shmobile: armadillo800eva: 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')
-rw-r--r--arch/arm/mach-shmobile/board-armadillo800eva.c48
1 files changed, 17 insertions, 31 deletions
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
index 5f179e1cb157..efd6a36ef769 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
@@ -1000,16 +1000,12 @@ static void __init eva_init(void)
1000 gpio_request(GPIO_FN_LCD0_DISP, NULL); 1000 gpio_request(GPIO_FN_LCD0_DISP, NULL);
1001 gpio_request(GPIO_FN_LCD0_LCLK_PORT165, NULL); 1001 gpio_request(GPIO_FN_LCD0_LCLK_PORT165, NULL);
1002 1002
1003 gpio_request(GPIO_PORT61, NULL); /* LCDDON */ 1003 gpio_request_one(GPIO_PORT61, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */
1004 gpio_direction_output(GPIO_PORT61, 1); 1004 gpio_request_one(GPIO_PORT202, GPIOF_OUT_INIT_LOW, NULL); /* LCD0_LED_CONT */
1005
1006 gpio_request(GPIO_PORT202, NULL); /* LCD0_LED_CONT */
1007 gpio_direction_output(GPIO_PORT202, 0);
1008 1005
1009 /* Touchscreen */ 1006 /* Touchscreen */
1010 gpio_request(GPIO_FN_IRQ10, NULL); /* TP_INT */ 1007 gpio_request(GPIO_FN_IRQ10, NULL); /* TP_INT */
1011 gpio_request(GPIO_PORT166, NULL); /* TP_RST_B */ 1008 gpio_request_one(GPIO_PORT166, GPIOF_OUT_INIT_HIGH, NULL); /* TP_RST_B */
1012 gpio_direction_output(GPIO_PORT166, 1);
1013 1009
1014 /* GETHER */ 1010 /* GETHER */
1015 gpio_request(GPIO_FN_ET_CRS, NULL); 1011 gpio_request(GPIO_FN_ET_CRS, NULL);
@@ -1032,12 +1028,10 @@ static void __init eva_init(void)
1032 gpio_request(GPIO_FN_ET_RX_DV, NULL); 1028 gpio_request(GPIO_FN_ET_RX_DV, NULL);
1033 gpio_request(GPIO_FN_ET_RX_CLK, NULL); 1029 gpio_request(GPIO_FN_ET_RX_CLK, NULL);
1034 1030
1035 gpio_request(GPIO_PORT18, NULL); /* PHY_RST */ 1031 gpio_request_one(GPIO_PORT18, GPIOF_OUT_INIT_HIGH, NULL); /* PHY_RST */
1036 gpio_direction_output(GPIO_PORT18, 1);
1037 1032
1038 /* USB */ 1033 /* USB */
1039 gpio_request(GPIO_PORT159, NULL); /* USB_DEVICE_MODE */ 1034 gpio_request_one(GPIO_PORT159, GPIOF_IN, NULL); /* USB_DEVICE_MODE */
1040 gpio_direction_input(GPIO_PORT159);
1041 1035
1042 if (gpio_get_value(GPIO_PORT159)) { 1036 if (gpio_get_value(GPIO_PORT159)) {
1043 /* USB Host */ 1037 /* USB Host */
@@ -1051,8 +1045,7 @@ static void __init eva_init(void)
1051 * and select GPIO_PORT209 here 1045 * and select GPIO_PORT209 here
1052 */ 1046 */
1053 gpio_request(GPIO_FN_IRQ7_PORT209, NULL); 1047 gpio_request(GPIO_FN_IRQ7_PORT209, NULL);
1054 gpio_request(GPIO_PORT209, NULL); 1048 gpio_request_one(GPIO_PORT209, GPIOF_IN, NULL);
1055 gpio_direction_input(GPIO_PORT209);
1056 1049
1057 platform_device_register(&usbhsf_device); 1050 platform_device_register(&usbhsf_device);
1058 usb = &usbhsf_device; 1051 usb = &usbhsf_device;
@@ -1067,12 +1060,9 @@ static void __init eva_init(void)
1067 gpio_request(GPIO_FN_SDHI0_D3, NULL); 1060 gpio_request(GPIO_FN_SDHI0_D3, NULL);
1068 gpio_request(GPIO_FN_SDHI0_WP, NULL); 1061 gpio_request(GPIO_FN_SDHI0_WP, NULL);
1069 1062
1070 gpio_request(GPIO_PORT17, NULL); /* SDHI0_18/33_B */ 1063 gpio_request_one(GPIO_PORT17, GPIOF_OUT_INIT_LOW, NULL); /* SDHI0_18/33_B */
1071 gpio_request(GPIO_PORT74, NULL); /* SDHI0_PON */ 1064 gpio_request_one(GPIO_PORT74, GPIOF_OUT_INIT_HIGH, NULL); /* SDHI0_PON */
1072 gpio_request(GPIO_PORT75, NULL); /* SDSLOT1_PON */ 1065 gpio_request_one(GPIO_PORT75, GPIOF_OUT_INIT_HIGH, NULL); /* SDSLOT1_PON */
1073 gpio_direction_output(GPIO_PORT17, 0);
1074 gpio_direction_output(GPIO_PORT74, 1);
1075 gpio_direction_output(GPIO_PORT75, 1);
1076 1066
1077 /* we can use GPIO_FN_IRQ31_PORT167 here for SDHI0 CD irq */ 1067 /* we can use GPIO_FN_IRQ31_PORT167 here for SDHI0 CD irq */
1078 1068
@@ -1109,12 +1099,10 @@ static void __init eva_init(void)
1109 gpio_request(GPIO_FN_VIO_CKO, NULL); 1099 gpio_request(GPIO_FN_VIO_CKO, NULL);
1110 1100
1111 /* CON1/CON15 Camera */ 1101 /* CON1/CON15 Camera */
1112 gpio_request(GPIO_PORT173, NULL); /* STANDBY */ 1102 gpio_request_one(GPIO_PORT173, GPIOF_OUT_INIT_LOW, NULL); /* STANDBY */
1113 gpio_request(GPIO_PORT172, NULL); /* RST */ 1103 gpio_request_one(GPIO_PORT172, GPIOF_OUT_INIT_HIGH, NULL); /* RST */
1114 gpio_request(GPIO_PORT158, NULL); /* CAM_PON */ 1104 /* see mt9t111_power() */
1115 gpio_direction_output(GPIO_PORT173, 0); 1105 gpio_request_one(GPIO_PORT158, GPIOF_OUT_INIT_LOW, NULL); /* CAM_PON */
1116 gpio_direction_output(GPIO_PORT172, 1);
1117 gpio_direction_output(GPIO_PORT158, 0); /* see mt9t111_power() */
1118 1106
1119 /* FSI-WM8978 */ 1107 /* FSI-WM8978 */
1120 gpio_request(GPIO_FN_FSIAIBT, NULL); 1108 gpio_request(GPIO_FN_FSIAIBT, NULL);
@@ -1141,15 +1129,13 @@ static void __init eva_init(void)
1141 * DBGMD/LCDC0/FSIA MUX 1129 * DBGMD/LCDC0/FSIA MUX
1142 * DBGMD_SELECT_B should be set after setting PFC Function. 1130 * DBGMD_SELECT_B should be set after setting PFC Function.
1143 */ 1131 */
1144 gpio_request(GPIO_PORT176, NULL); 1132 gpio_request_one(GPIO_PORT176, GPIOF_OUT_INIT_HIGH, NULL);
1145 gpio_direction_output(GPIO_PORT176, 1);
1146 1133
1147 /* 1134 /*
1148 * We can switch CON8/CON14 by SW1.5, 1135 * We can switch CON8/CON14 by SW1.5,
1149 * but it needs after DBGMD_SELECT_B 1136 * but it needs after DBGMD_SELECT_B
1150 */ 1137 */
1151 gpio_request(GPIO_PORT6, NULL); 1138 gpio_request_one(GPIO_PORT6, GPIOF_IN, NULL);
1152 gpio_direction_input(GPIO_PORT6);
1153 if (gpio_get_value(GPIO_PORT6)) { 1139 if (gpio_get_value(GPIO_PORT6)) {
1154 /* CON14 enable */ 1140 /* CON14 enable */
1155 } else { 1141 } else {
@@ -1163,8 +1149,8 @@ static void __init eva_init(void)
1163 gpio_request(GPIO_FN_SDHI1_CD, NULL); 1149 gpio_request(GPIO_FN_SDHI1_CD, NULL);
1164 gpio_request(GPIO_FN_SDHI1_WP, NULL); 1150 gpio_request(GPIO_FN_SDHI1_WP, NULL);
1165 1151
1166 gpio_request(GPIO_PORT16, NULL); /* SDSLOT2_PON */ 1152 /* SDSLOT2_PON */
1167 gpio_direction_output(GPIO_PORT16, 1); 1153 gpio_request_one(GPIO_PORT16, GPIOF_OUT_INIT_HIGH, NULL);
1168 1154
1169 platform_device_register(&sdhi1_device); 1155 platform_device_register(&sdhi1_device);
1170 } 1156 }