]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/video/omap/lcd_p2.c
Merge branch 'master' of /home/tmlind/src/kernel/linux-2.6/
[linux-2.6-omap-h63xx.git] / drivers / video / omap / lcd_p2.c
index 5a3e2dbf79089f24f63dd7b9c9a36b8396c52d29..864033d4b54f4385bab4d0aacebe55e8e997a160 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <linux/module.h>
 #include <linux/delay.h>
+#include <linux/platform_device.h>
 
 #include <asm/arch/mux.h>
 #include <asm/arch/gpio.h>
@@ -147,29 +148,23 @@ const unsigned short INIT_SCSTART[2] = { 0x00, 0x00 };
 /* ----- end of epson_md_tft.h ----- */
 
 
-#include "debug.h"
 #include "../drivers/ssi/omap-uwire.h"
 
 #define LCD_UWIRE_CS 0
 
-static int p2_panel_init(struct omapfb_device *fbdev)
+static int p2_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev)
 {
-       DBGENTER(1);
-       DBGLEAVE(1);
        return 0;
 }
 
-static void p2_panel_cleanup(void)
+static void p2_panel_cleanup(struct lcd_panel *panel)
 {
-       DBGENTER(1);
-       DBGLEAVE(1);
 }
 
-static int p2_panel_enable(void)
+static int p2_panel_enable(struct lcd_panel *panel)
 {
        int i;
        unsigned long value;
-       DBGENTER(1);
 
                /* thwack the reset line */
        omap_set_gpio_direction(19, 0);
@@ -267,17 +262,14 @@ static int p2_panel_enable(void)
        omap_set_gpio_direction(134, 0);
        omap_set_gpio_dataout(134, 1);
 
-       DBGLEAVE(1);
        return 0;
 }
 
-static void p2_panel_disable(void)
+static void p2_panel_disable(struct lcd_panel *panel)
 {
-       DBGENTER(1);
-       DBGLEAVE(1);
 }
 
-static unsigned long p2_panel_get_caps(void)
+static unsigned long p2_panel_get_caps(struct lcd_panel *panel)
 {
        return 0;
 }
@@ -305,3 +297,48 @@ struct lcd_panel p2_panel = {
        .get_caps       = p2_panel_get_caps,
 };
 
+static int p2_panel_probe(struct platform_device *pdev)
+{
+       omapfb_register_panel(&p2_panel);
+       return 0;
+}
+
+static int p2_panel_remove(struct platform_device *pdev)
+{
+       return 0;
+}
+
+static int p2_panel_suspend(struct platform_device *pdev, pm_message_t mesg)
+{
+       return 0;
+}
+
+static int p2_panel_resume(struct platform_device *pdev)
+{
+       return 0;
+}
+
+struct platform_driver p2_panel_driver = {
+       .probe          = p2_panel_probe,
+       .remove         = p2_panel_remove,
+       .suspend        = p2_panel_suspend,
+       .resume         = p2_panel_resume,
+       .driver         = {
+               .name   = "lcd_p2",
+               .owner  = THIS_MODULE,
+       },
+};
+
+static int p2_panel_drv_init(void)
+{
+       return platform_driver_register(&p2_panel_driver);
+}
+
+static void p2_panel_drv_cleanup(void)
+{
+       platform_driver_unregister(&p2_panel_driver);
+}
+
+module_init(p2_panel_drv_init);
+module_exit(p2_panel_drv_cleanup);
+