diff options
Diffstat (limited to 'board/logicpd')
-rw-r--r-- | board/logicpd/zoom2/debug_board.c | 10 | ||||
-rw-r--r-- | board/logicpd/zoom2/led.c | 38 | ||||
-rw-r--r-- | board/logicpd/zoom2/zoom2.c | 10 |
3 files changed, 29 insertions, 29 deletions
diff --git a/board/logicpd/zoom2/debug_board.c b/board/logicpd/zoom2/debug_board.c index a4ddf29294..33aa6001bc 100644 --- a/board/logicpd/zoom2/debug_board.c +++ b/board/logicpd/zoom2/debug_board.c @@ -22,7 +22,7 @@ #include <asm/arch/cpu.h> #include <asm/io.h> #include <asm/arch/mux.h> -#include <asm/arch/gpio.h> +#include <asm/gpio.h> #define DEBUG_BOARD_CONNECTED 1 #define DEBUG_BOARD_NOT_CONNECTED 0 @@ -33,14 +33,14 @@ static void zoom2_debug_board_detect (void) { int val = 0; - if (!omap_request_gpio(158)) { + if (!gpio_request(158, "")) { /* * GPIO to query for debug board * 158 db board query */ - omap_set_gpio_direction(158, 1); - val = omap_get_gpio_datain(158); - omap_free_gpio(158); + gpio_direction_input(158); + val = gpio_get_value(158); + gpio_free(158); } if (!val) diff --git a/board/logicpd/zoom2/led.c b/board/logicpd/zoom2/led.c index 4e14c58f0b..42553727e4 100644 --- a/board/logicpd/zoom2/led.c +++ b/board/logicpd/zoom2/led.c @@ -22,7 +22,7 @@ #include <asm/arch/cpu.h> #include <asm/io.h> #include <asm/arch/sys_proto.h> -#include <asm/arch/gpio.h> +#include <asm/gpio.h> static unsigned int saved_state[2] = {STATUS_LED_OFF, STATUS_LED_OFF}; @@ -39,9 +39,9 @@ static unsigned int saved_state[2] = {STATUS_LED_OFF, STATUS_LED_OFF}; void red_LED_off (void) { /* red */ - if (!omap_request_gpio(ZOOM2_LED_RED)) { - omap_set_gpio_direction(ZOOM2_LED_RED, 0); - omap_set_gpio_dataout(ZOOM2_LED_RED, 0); + if (!gpio_request(ZOOM2_LED_RED, "")) { + gpio_direction_output(ZOOM2_LED_RED, 0); + gpio_set_value(ZOOM2_LED_RED, 0); } saved_state[STATUS_LED_RED] = STATUS_LED_OFF; } @@ -49,15 +49,15 @@ void red_LED_off (void) void blue_LED_off (void) { /* blue */ - if (!omap_request_gpio(ZOOM2_LED_BLUE)) { - omap_set_gpio_direction(ZOOM2_LED_BLUE, 0); - omap_set_gpio_dataout(ZOOM2_LED_BLUE, 0); + if (!gpio_request(ZOOM2_LED_BLUE, "")) { + gpio_direction_output(ZOOM2_LED_BLUE, 0); + gpio_set_value(ZOOM2_LED_BLUE, 0); } /* blue 2 */ - if (!omap_request_gpio(ZOOM2_LED_BLUE2)) { - omap_set_gpio_direction(ZOOM2_LED_BLUE2, 0); - omap_set_gpio_dataout(ZOOM2_LED_BLUE2, 0); + if (!gpio_request(ZOOM2_LED_BLUE2, "")) { + gpio_direction_output(ZOOM2_LED_BLUE2, 0); + gpio_set_value(ZOOM2_LED_BLUE2, 0); } saved_state[STATUS_LED_BLUE] = STATUS_LED_OFF; } @@ -67,9 +67,9 @@ void red_LED_on (void) blue_LED_off (); /* red */ - if (!omap_request_gpio(ZOOM2_LED_RED)) { - omap_set_gpio_direction(ZOOM2_LED_RED, 0); - omap_set_gpio_dataout(ZOOM2_LED_RED, 1); + if (!gpio_request(ZOOM2_LED_RED, "")) { + gpio_direction_output(ZOOM2_LED_RED, 0); + gpio_set_value(ZOOM2_LED_RED, 1); } saved_state[STATUS_LED_RED] = STATUS_LED_ON; } @@ -79,15 +79,15 @@ void blue_LED_on (void) red_LED_off (); /* blue */ - if (!omap_request_gpio(ZOOM2_LED_BLUE)) { - omap_set_gpio_direction(ZOOM2_LED_BLUE, 0); - omap_set_gpio_dataout(ZOOM2_LED_BLUE, 1); + if (!gpio_request(ZOOM2_LED_BLUE, "")) { + gpio_direction_output(ZOOM2_LED_BLUE, 0); + gpio_set_value(ZOOM2_LED_BLUE, 1); } /* blue 2 */ - if (!omap_request_gpio(ZOOM2_LED_BLUE2)) { - omap_set_gpio_direction(ZOOM2_LED_BLUE2, 0); - omap_set_gpio_dataout(ZOOM2_LED_BLUE2, 1); + if (!gpio_request(ZOOM2_LED_BLUE2, "")) { + gpio_direction_output(ZOOM2_LED_BLUE2, 0); + gpio_set_value(ZOOM2_LED_BLUE2, 1); } saved_state[STATUS_LED_BLUE] = STATUS_LED_ON; diff --git a/board/logicpd/zoom2/zoom2.c b/board/logicpd/zoom2/zoom2.c index 800113a976..21964c2405 100644 --- a/board/logicpd/zoom2/zoom2.c +++ b/board/logicpd/zoom2/zoom2.c @@ -36,7 +36,7 @@ #include <twl4030.h> #include <asm/io.h> #include <asm/arch/mmc_host_def.h> -#include <asm/arch/gpio.h> +#include <asm/gpio.h> #include <asm/arch/mem.h> #include <asm/arch/mux.h> #include <asm/arch/sys_proto.h> @@ -90,12 +90,12 @@ void zoom2_identify(void) * and they are not commonly used. They are mentioned here * only for completeness. */ - if (!omap_request_gpio(94)) { + if (!gpio_request(94, "")) { unsigned int val; - omap_set_gpio_direction(94, 1); - val = omap_get_gpio_datain(94); - omap_free_gpio(94); + gpio_direction_input(94); + val = gpio_get_value(94); + gpio_free(94); if (val) revision = ZOOM2_REVISION_BETA; |