aboutsummaryrefslogtreecommitdiffstats
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
commitbe2edfcc2874bebfddaf270726e72b53c8017df9 (patch)
treed73c9c597a445539d61704625f34816ec7456f43
parentb58e5fac96e4f24fc9d5bce8692506ada3e244ca (diff)
ARM: shmobile: ap4-evb: 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>
-rw-r--r--arch/arm/mach-shmobile/board-ap4evb.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index 38f1259a0daf..0a2b6e435b65 100644
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ b/arch/arm/mach-shmobile/board-ap4evb.c
@@ -273,11 +273,11 @@ static struct platform_device smc911x_device = {
273 273
274/* 274/*
275 * The card detect pin of the top SD/MMC slot (CN7) is active low and is 275 * The card detect pin of the top SD/MMC slot (CN7) is active low and is
276 * connected to GPIO A22 of SH7372 (GPIO_PORT41). 276 * connected to GPIO A22 of SH7372 (GPIO 41).
277 */ 277 */
278static int slot_cn7_get_cd(struct platform_device *pdev) 278static int slot_cn7_get_cd(struct platform_device *pdev)
279{ 279{
280 return !gpio_get_value(GPIO_PORT41); 280 return !gpio_get_value(41);
281} 281}
282/* MERAM */ 282/* MERAM */
283static struct sh_mobile_meram_info meram_info = { 283static struct sh_mobile_meram_info meram_info = {
@@ -838,22 +838,22 @@ static struct platform_device fsi_hdmi_device = {
838static struct gpio_led ap4evb_leds[] = { 838static struct gpio_led ap4evb_leds[] = {
839 { 839 {
840 .name = "led4", 840 .name = "led4",
841 .gpio = GPIO_PORT185, 841 .gpio = 185,
842 .default_state = LEDS_GPIO_DEFSTATE_ON, 842 .default_state = LEDS_GPIO_DEFSTATE_ON,
843 }, 843 },
844 { 844 {
845 .name = "led2", 845 .name = "led2",
846 .gpio = GPIO_PORT186, 846 .gpio = 186,
847 .default_state = LEDS_GPIO_DEFSTATE_ON, 847 .default_state = LEDS_GPIO_DEFSTATE_ON,
848 }, 848 },
849 { 849 {
850 .name = "led3", 850 .name = "led3",
851 .gpio = GPIO_PORT187, 851 .gpio = 187,
852 .default_state = LEDS_GPIO_DEFSTATE_ON, 852 .default_state = LEDS_GPIO_DEFSTATE_ON,
853 }, 853 },
854 { 854 {
855 .name = "led1", 855 .name = "led1",
856 .gpio = GPIO_PORT188, 856 .gpio = 188,
857 .default_state = LEDS_GPIO_DEFSTATE_ON, 857 .default_state = LEDS_GPIO_DEFSTATE_ON,
858 } 858 }
859}; 859};
@@ -1026,10 +1026,10 @@ out:
1026/* TouchScreen */ 1026/* TouchScreen */
1027#ifdef CONFIG_AP4EVB_QHD 1027#ifdef CONFIG_AP4EVB_QHD
1028# define GPIO_TSC_IRQ GPIO_FN_IRQ28_123 1028# define GPIO_TSC_IRQ GPIO_FN_IRQ28_123
1029# define GPIO_TSC_PORT GPIO_PORT123 1029# define GPIO_TSC_PORT 123
1030#else /* WVGA */ 1030#else /* WVGA */
1031# define GPIO_TSC_IRQ GPIO_FN_IRQ7_40 1031# define GPIO_TSC_IRQ GPIO_FN_IRQ7_40
1032# define GPIO_TSC_PORT GPIO_PORT40 1032# define GPIO_TSC_PORT 40
1033#endif 1033#endif
1034 1034
1035#define IRQ28 evt2irq(0x3380) /* IRQ28A */ 1035#define IRQ28 evt2irq(0x3380) /* IRQ28A */
@@ -1121,10 +1121,10 @@ static void __init ap4evb_init(void)
1121 gpio_request(GPIO_FN_IRQ6_39, NULL); 1121 gpio_request(GPIO_FN_IRQ6_39, NULL);
1122 1122
1123 /* enable Debug switch (S6) */ 1123 /* enable Debug switch (S6) */
1124 gpio_request_one(GPIO_PORT32, GPIOF_IN | GPIOF_EXPORT, NULL); 1124 gpio_request_one(32, GPIOF_IN | GPIOF_EXPORT, NULL);
1125 gpio_request_one(GPIO_PORT33, GPIOF_IN | GPIOF_EXPORT, NULL); 1125 gpio_request_one(33, GPIOF_IN | GPIOF_EXPORT, NULL);
1126 gpio_request_one(GPIO_PORT34, GPIOF_IN | GPIOF_EXPORT, NULL); 1126 gpio_request_one(34, GPIOF_IN | GPIOF_EXPORT, NULL);
1127 gpio_request_one(GPIO_PORT35, GPIOF_IN | GPIOF_EXPORT, NULL); 1127 gpio_request_one(35, GPIOF_IN | GPIOF_EXPORT, NULL);
1128 1128
1129 /* SDHI0 */ 1129 /* SDHI0 */
1130 gpio_request(GPIO_FN_SDHICD0, NULL); 1130 gpio_request(GPIO_FN_SDHICD0, NULL);
@@ -1172,15 +1172,15 @@ static void __init ap4evb_init(void)
1172 gpio_request(GPIO_FN_FSIAILR, NULL); 1172 gpio_request(GPIO_FN_FSIAILR, NULL);
1173 gpio_request(GPIO_FN_FSIAISLD, NULL); 1173 gpio_request(GPIO_FN_FSIAISLD, NULL);
1174 gpio_request(GPIO_FN_FSIAOSLD, NULL); 1174 gpio_request(GPIO_FN_FSIAOSLD, NULL);
1175 gpio_request_one(GPIO_PORT161, GPIOF_OUT_INIT_LOW, NULL); /* slave */ 1175 gpio_request_one(161, GPIOF_OUT_INIT_LOW, NULL); /* slave */
1176 1176
1177 gpio_request(GPIO_PORT9, NULL); 1177 gpio_request(9, NULL);
1178 gpio_request(GPIO_PORT10, NULL); 1178 gpio_request(10, NULL);
1179 gpio_direction_none(GPIO_PORT9CR); /* FSIAOBT needs no direction */ 1179 gpio_direction_none(GPIO_PORT9CR); /* FSIAOBT needs no direction */
1180 gpio_direction_none(GPIO_PORT10CR); /* FSIAOLR needs no direction */ 1180 gpio_direction_none(GPIO_PORT10CR); /* FSIAOLR needs no direction */
1181 1181
1182 /* card detect pin for MMC slot (CN7) */ 1182 /* card detect pin for MMC slot (CN7) */
1183 gpio_request_one(GPIO_PORT41, GPIOF_IN, NULL); 1183 gpio_request_one(41, GPIOF_IN, NULL);
1184 1184
1185 /* setup FSI2 port B (HDMI) */ 1185 /* setup FSI2 port B (HDMI) */
1186 gpio_request(GPIO_FN_FSIBCK, NULL); 1186 gpio_request(GPIO_FN_FSIBCK, NULL);
@@ -1268,8 +1268,8 @@ static void __init ap4evb_init(void)
1268 gpio_request(GPIO_FN_LCDDISP, NULL); 1268 gpio_request(GPIO_FN_LCDDISP, NULL);
1269 gpio_request(GPIO_FN_LCDDCK, NULL); 1269 gpio_request(GPIO_FN_LCDDCK, NULL);
1270 1270
1271 gpio_request_one(GPIO_PORT189, GPIOF_OUT_INIT_HIGH, NULL); /* backlight */ 1271 gpio_request_one(189, GPIOF_OUT_INIT_HIGH, NULL); /* backlight */
1272 gpio_request_one(GPIO_PORT151, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */ 1272 gpio_request_one(151, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */
1273 1273
1274 lcdc_info.clock_source = LCDC_CLK_BUS; 1274 lcdc_info.clock_source = LCDC_CLK_BUS;
1275 lcdc_info.ch[0].interface_type = RGB18; 1275 lcdc_info.ch[0].interface_type = RGB18;