/*
- * File: drivers/video/omap/lcd_apollon.c
- *
* LCD panel support for the Samsung OMAP2 Apollon board
*
* Copyright (C) 2005,2006 Samsung Electronics
*/
#include <linux/module.h>
+#include <linux/platform_device.h>
#include <asm/arch/gpio.h>
#include <asm/arch/mux.h>
#include <asm/arch/omapfb.h>
-/* #define OMAPFB_DBG 1 */
-
/* #define USE_35INCH_LCD 1 */
-#include "debug.h"
-
-static int apollon_panel_init(struct omapfb_device *fbdev)
+static int apollon_panel_init(struct lcd_panel *panel,
+ struct omapfb_device *fbdev)
{
- DBGENTER(1);
- DBGLEAVE(1);
+ /* configure LCD PWR_EN */
+ omap_cfg_reg(M21_242X_GPIO11);
return 0;
}
-static void apollon_panel_cleanup(void)
+static void apollon_panel_cleanup(struct lcd_panel *panel)
{
- DBGENTER(1);
- DBGLEAVE(1);
}
-static int apollon_panel_enable(void)
+static int apollon_panel_enable(struct lcd_panel *panel)
{
-
- DBGENTER(1);
-
- /* configure LCD PWR_EN */
- omap_cfg_reg(M21_242X_GPIO11);
-
- DBGLEAVE(1);
return 0;
}
-static void apollon_panel_disable(void)
+static void apollon_panel_disable(struct lcd_panel *panel)
{
- DBGENTER(1);
- DBGLEAVE(1);
}
-static unsigned long apollon_panel_get_caps(void)
+static unsigned long apollon_panel_get_caps(struct lcd_panel *panel)
{
return 0;
}
.disable = apollon_panel_disable,
.get_caps = apollon_panel_get_caps,
};
+
+static int apollon_panel_probe(struct platform_device *pdev)
+{
+ omapfb_register_panel(&apollon_panel);
+ return 0;
+}
+
+static int apollon_panel_remove(struct platform_device *pdev)
+{
+ return 0;
+}
+
+static int apollon_panel_suspend(struct platform_device *pdev, pm_message_t mesg)
+{
+ return 0;
+}
+
+static int apollon_panel_resume(struct platform_device *pdev)
+{
+ return 0;
+}
+
+struct platform_driver apollon_panel_driver = {
+ .probe = apollon_panel_probe,
+ .remove = apollon_panel_remove,
+ .suspend = apollon_panel_suspend,
+ .resume = apollon_panel_resume,
+ .driver = {
+ .name = "apollon_lcd",
+ .owner = THIS_MODULE,
+ },
+};
+
+static int __init apollon_panel_drv_init(void)
+{
+ return platform_driver_register(&apollon_panel_driver);
+}
+
+static void __exit apollon_panel_drv_exit(void)
+{
+ platform_driver_unregister(&apollon_panel_driver);
+}
+
+module_init(apollon_panel_drv_init);
+module_exit(apollon_panel_drv_exit);