]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/video/omap/lcd_inn1610.c
omap drivers: switch to standard GPIO calls
[linux-2.6-omap-h63xx.git] / drivers / video / omap / lcd_inn1610.c
index 95604ca43301e7004ce61ae5d1b52dce91c092ff..4c4f7ee6d733a66e739c6be1e9cd65ad370f8633 100644 (file)
 #include <linux/module.h>
 #include <linux/platform_device.h>
 
-#include <asm/arch/gpio.h>
-#include <asm/arch/omapfb.h>
+#include <mach/gpio.h>
+#include <mach/omapfb.h>
 
 #define MODULE_NAME    "omapfb-lcd_h3"
 
-#define pr_err(fmt, args...) printk(KERN_ERR MODULE_NAME ": " fmt, ## args)
-
 static int innovator1610_panel_init(struct lcd_panel *panel,
                                    struct omapfb_device *fbdev)
 {
        int r = 0;
 
-       if (omap_request_gpio(14)) {
-               pr_err("can't request GPIO 14\n");
+       if (gpio_request(14, "lcd_en0")) {
+               pr_err(MODULE_NAME ": can't request GPIO 14\n");
                r = -1;
                goto exit;
        }
-       if (omap_request_gpio(15)) {
-               pr_err("can't request GPIO 15\n");
-               omap_free_gpio(14);
+       if (gpio_request(15, "lcd_en1")) {
+               pr_err(MODULE_NAME ": can't request GPIO 15\n");
+               gpio_free(14);
                r = -1;
                goto exit;
        }
        /* configure GPIO(14, 15) as outputs */
-       omap_set_gpio_direction(14, 0);
-       omap_set_gpio_direction(15, 0);
+       gpio_direction_output(14, 0);
+       gpio_direction_output(15, 0);
 exit:
        return r;
 }
 
 static void innovator1610_panel_cleanup(struct lcd_panel *panel)
 {
-       omap_free_gpio(15);
-       omap_free_gpio(14);
+       gpio_free(15);
+       gpio_free(14);
 }
 
 static int innovator1610_panel_enable(struct lcd_panel *panel)
 {
        /* set GPIO14 and GPIO15 high */
-       omap_set_gpio_dataout(14, 1);
-       omap_set_gpio_dataout(15, 1);
+       gpio_set_value(14, 1);
+       gpio_set_value(15, 1);
        return 0;
 }
 
 static void innovator1610_panel_disable(struct lcd_panel *panel)
 {
        /* set GPIO13, GPIO14 and GPIO15 low */
-       omap_set_gpio_dataout(14, 0);
-       omap_set_gpio_dataout(15, 0);
+       gpio_set_value(14, 0);
+       gpio_set_value(15, 0);
 }
 
 static unsigned long innovator1610_panel_get_caps(struct lcd_panel *panel)