diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2013-01-24 07:16:29 -0500 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2013-01-27 19:54:20 -0500 |
commit | 5683eafdfd039681a0d30c402a0675b521313659 (patch) | |
tree | f96ec26d334b4b3dca63c37a790ab4b94bc3e4ca | |
parent | f3347b7a33512d55e11de419be335b7d8de9a572 (diff) |
ARM: shmobile: ap4evb: 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>
-rw-r--r-- | arch/arm/mach-shmobile/board-ap4evb.c | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 70d287c28a62..0c59464230fb 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c | |||
@@ -1046,9 +1046,7 @@ static int ts_get_pendown_state(void) | |||
1046 | 1046 | ||
1047 | gpio_free(GPIO_TSC_IRQ); | 1047 | gpio_free(GPIO_TSC_IRQ); |
1048 | 1048 | ||
1049 | gpio_request(GPIO_TSC_PORT, NULL); | 1049 | gpio_request_one(GPIO_TSC_PORT, GPIOF_IN, NULL); |
1050 | |||
1051 | gpio_direction_input(GPIO_TSC_PORT); | ||
1052 | 1050 | ||
1053 | val = gpio_get_value(GPIO_TSC_PORT); | 1051 | val = gpio_get_value(GPIO_TSC_PORT); |
1054 | 1052 | ||
@@ -1129,18 +1127,10 @@ static void __init ap4evb_init(void) | |||
1129 | gpio_request(GPIO_FN_IRQ6_39, NULL); | 1127 | gpio_request(GPIO_FN_IRQ6_39, NULL); |
1130 | 1128 | ||
1131 | /* enable Debug switch (S6) */ | 1129 | /* enable Debug switch (S6) */ |
1132 | gpio_request(GPIO_PORT32, NULL); | 1130 | gpio_request_one(GPIO_PORT32, GPIOF_IN | GPIOF_EXPORT, NULL); |
1133 | gpio_request(GPIO_PORT33, NULL); | 1131 | gpio_request_one(GPIO_PORT33, GPIOF_IN | GPIOF_EXPORT, NULL); |
1134 | gpio_request(GPIO_PORT34, NULL); | 1132 | gpio_request_one(GPIO_PORT34, GPIOF_IN | GPIOF_EXPORT, NULL); |
1135 | gpio_request(GPIO_PORT35, NULL); | 1133 | gpio_request_one(GPIO_PORT35, GPIOF_IN | GPIOF_EXPORT, NULL); |
1136 | gpio_direction_input(GPIO_PORT32); | ||
1137 | gpio_direction_input(GPIO_PORT33); | ||
1138 | gpio_direction_input(GPIO_PORT34); | ||
1139 | gpio_direction_input(GPIO_PORT35); | ||
1140 | gpio_export(GPIO_PORT32, 0); | ||
1141 | gpio_export(GPIO_PORT33, 0); | ||
1142 | gpio_export(GPIO_PORT34, 0); | ||
1143 | gpio_export(GPIO_PORT35, 0); | ||
1144 | 1134 | ||
1145 | /* SDHI0 */ | 1135 | /* SDHI0 */ |
1146 | gpio_request(GPIO_FN_SDHICD0, NULL); | 1136 | gpio_request(GPIO_FN_SDHICD0, NULL); |
@@ -1188,8 +1178,7 @@ static void __init ap4evb_init(void) | |||
1188 | gpio_request(GPIO_FN_FSIAILR, NULL); | 1178 | gpio_request(GPIO_FN_FSIAILR, NULL); |
1189 | gpio_request(GPIO_FN_FSIAISLD, NULL); | 1179 | gpio_request(GPIO_FN_FSIAISLD, NULL); |
1190 | gpio_request(GPIO_FN_FSIAOSLD, NULL); | 1180 | gpio_request(GPIO_FN_FSIAOSLD, NULL); |
1191 | gpio_request(GPIO_PORT161, NULL); | 1181 | gpio_request_one(GPIO_PORT161, GPIOF_OUT_INIT_LOW, NULL); /* slave */ |
1192 | gpio_direction_output(GPIO_PORT161, 0); /* slave */ | ||
1193 | 1182 | ||
1194 | gpio_request(GPIO_PORT9, NULL); | 1183 | gpio_request(GPIO_PORT9, NULL); |
1195 | gpio_request(GPIO_PORT10, NULL); | 1184 | gpio_request(GPIO_PORT10, NULL); |
@@ -1197,8 +1186,7 @@ static void __init ap4evb_init(void) | |||
1197 | gpio_direction_none(GPIO_PORT10CR); /* FSIAOLR needs no direction */ | 1186 | gpio_direction_none(GPIO_PORT10CR); /* FSIAOLR needs no direction */ |
1198 | 1187 | ||
1199 | /* card detect pin for MMC slot (CN7) */ | 1188 | /* card detect pin for MMC slot (CN7) */ |
1200 | gpio_request(GPIO_PORT41, NULL); | 1189 | gpio_request_one(GPIO_PORT41, GPIOF_IN, NULL); |
1201 | gpio_direction_input(GPIO_PORT41); | ||
1202 | 1190 | ||
1203 | /* setup FSI2 port B (HDMI) */ | 1191 | /* setup FSI2 port B (HDMI) */ |
1204 | gpio_request(GPIO_FN_FSIBCK, NULL); | 1192 | gpio_request(GPIO_FN_FSIBCK, NULL); |
@@ -1286,11 +1274,8 @@ static void __init ap4evb_init(void) | |||
1286 | gpio_request(GPIO_FN_LCDDISP, NULL); | 1274 | gpio_request(GPIO_FN_LCDDISP, NULL); |
1287 | gpio_request(GPIO_FN_LCDDCK, NULL); | 1275 | gpio_request(GPIO_FN_LCDDCK, NULL); |
1288 | 1276 | ||
1289 | gpio_request(GPIO_PORT189, NULL); /* backlight */ | 1277 | gpio_request_one(GPIO_PORT189, GPIOF_OUT_INIT_HIGH, NULL); /* backlight */ |
1290 | gpio_direction_output(GPIO_PORT189, 1); | 1278 | gpio_request_one(GPIO_PORT151, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */ |
1291 | |||
1292 | gpio_request(GPIO_PORT151, NULL); /* LCDDON */ | ||
1293 | gpio_direction_output(GPIO_PORT151, 1); | ||
1294 | 1279 | ||
1295 | lcdc_info.clock_source = LCDC_CLK_BUS; | 1280 | lcdc_info.clock_source = LCDC_CLK_BUS; |
1296 | lcdc_info.ch[0].interface_type = RGB18; | 1281 | lcdc_info.ch[0].interface_type = RGB18; |