From 84c3b6312997de6f98114263159c8b9824f3d33d Mon Sep 17 00:00:00 2001 From: Sanjeev Premi Date: Thu, 8 Sep 2011 10:51:01 -0400 Subject: omap: gpio: Adapt board files to use generic API This patch contains updates the sources in the board files to use the generic API. Signed-off-by: Sanjeev Premi --- board/cm_t35/leds.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'board/cm_t35') diff --git a/board/cm_t35/leds.c b/board/cm_t35/leds.c index 71c5b0d..48ad598 100644 --- a/board/cm_t35/leds.c +++ b/board/cm_t35/leds.c @@ -20,26 +20,26 @@ */ #include #include -#include +#include static unsigned int leds[] = { GREEN_LED_GPIO }; void __led_init(led_id_t mask, int state) { - if (omap_request_gpio(leds[mask]) != 0) { + if (gpio_request(leds[mask], "") != 0) { printf("%s: failed requesting GPIO%u\n", __func__, leds[mask]); return; } - omap_set_gpio_direction(leds[mask], 0); + gpio_direction_output(leds[mask], 0); } void __led_set(led_id_t mask, int state) { - omap_set_gpio_dataout(leds[mask], state == STATUS_LED_ON); + gpio_set_value(leds[mask], state == STATUS_LED_ON); } void __led_toggle(led_id_t mask) { - omap_set_gpio_dataout(leds[mask], !omap_get_gpio_datain(leds[mask])); + gpio_set_value(leds[mask], !gpio_get_value(leds[mask])); } -- cgit v1.1