]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/video/omap/lcd_palmte.c
[PATCH] ARM: OMAP: Fix palmte lcd warnings
[linux-2.6-omap-h63xx.git] / drivers / video / omap / lcd_palmte.c
index 3f25b732a4b2441f6bcf923f43947fcdfeaf4f61..edb802ffe5abe5fe8b63869f015609925470eaef 100644 (file)
  */
 
 #include <linux/module.h>
+#include <linux/platform_device.h>
 
 #include <asm/io.h>
-#include <asm/arch/fpga.h>
 
-#include "omapfb.h"
+#include <asm/arch/fpga.h>
+#include <asm/arch/omapfb.h>
 
 /* #define OMAPFB_DBG 1 */
 
 #include "debug.h"
 
-static int palmte_panel_init(struct lcd_panel *panel)
+static int palmte_panel_init(struct omapfb_device *panel)
 {
        DBGENTER(1);
        DBGLEAVE(1);
        return 0;
 }
 
-static void palmte_panel_cleanup(struct lcd_panel *panel)
+static void palmte_panel_cleanup(void)
 {
        DBGENTER(1);
        DBGLEAVE(1);
 }
 
-static int palmte_panel_enable(struct lcd_panel *panel)
+static int palmte_panel_enable(void)
 {
        DBGENTER(1);
        DBGLEAVE(1);
        return 0;
 }
 
-static void palmte_panel_disable(struct lcd_panel *panel)
+static void palmte_panel_disable(void)
 {
        DBGENTER(1);
        DBGLEAVE(1);
 }
 
-static unsigned long palmte_panel_get_caps(struct lcd_panel *panel)
+static unsigned long palmte_panel_get_caps(void)
 {
        return 0;
 }
@@ -67,11 +68,11 @@ struct lcd_panel palmte_panel = {
        .name           = "palmte",
        .config         = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC |
                          OMAP_LCDC_INV_HSYNC | OMAP_LCDC_HSVS_RISING_EDGE |
-                         OMAP_LCDC_HSVS_OPPOSITE;
+                         OMAP_LCDC_HSVS_OPPOSITE,
 
        .data_lines     = 16,
        .bpp            = 8,
-       .pixel_clock    = 12500,
+       .pixel_clock    = 12000,
        .x_res          = 320,
        .y_res          = 320,
        .hsw            = 4,
@@ -80,7 +81,7 @@ struct lcd_panel palmte_panel = {
        .vsw            = 1,
        .vfp            = 8,
        .vbp            = 7,
-       .pcd            = 5,
+       .pcd            = 0,
 
        .init           = palmte_panel_init,
        .cleanup        = palmte_panel_cleanup,
@@ -89,3 +90,51 @@ struct lcd_panel palmte_panel = {
        .get_caps       = palmte_panel_get_caps,
 };
 
+static int palmte_panel_probe(struct platform_device *pdev)
+{
+       DBGENTER(1);
+       omapfb_register_panel(&palmte_panel);
+       return 0;
+}
+
+static int palmte_panel_remove(struct platform_device *pdev)
+{
+       DBGENTER(1);
+       return 0;
+}
+
+static int palmte_panel_suspend(struct platform_device *pdev, pm_message_t mesg)
+{
+       DBGENTER(1);
+       return 0;
+}
+
+static int palmte_panel_resume(struct platform_device *pdev)
+{
+       DBGENTER(1);
+       return 0;
+}
+
+struct platform_driver palmte_panel_driver = {
+       .probe          = palmte_panel_probe,
+       .remove         = palmte_panel_remove,
+       .suspend        = palmte_panel_suspend,
+       .resume         = palmte_panel_resume,
+       .driver         = {
+               .name   = "lcd_palmte",
+               .owner  = THIS_MODULE,
+       },
+};
+
+static int palmte_panel_drv_init(void)
+{
+       return platform_driver_register(&palmte_panel_driver);
+}
+
+static void palmte_panel_drv_cleanup(void)
+{
+       platform_driver_unregister(&palmte_panel_driver);
+}
+
+module_init(palmte_panel_drv_init);
+module_exit(palmte_panel_drv_cleanup);