/*
- * File: drivers/video/omap/lcd-p2.c
- *
* LCD panel support for the TI OMAP P2 board
*
* Authors:
#include <linux/module.h>
#include <linux/delay.h>
+#include <linux/platform_device.h>
#include <asm/arch/mux.h>
#include <asm/arch/gpio.h>
/* ----- 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);
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;
}
.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);
+