2 * Generic panel support
4 * Copyright (C) 2008 Nokia Corporation
5 * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com>
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 * You should have received a copy of the GNU General Public License along with
17 * this program. If not, see <http://www.gnu.org/licenses/>.
20 #include <linux/module.h>
21 #include <linux/delay.h>
23 #include <mach/display.h>
25 static int generic_panel_init(struct omap_display *display)
30 static int generic_panel_enable(struct omap_display *display)
34 if (display->hw_config.panel_enable)
35 r = display->hw_config.panel_enable(display);
40 static void generic_panel_disable(struct omap_display *display)
42 if (display->hw_config.panel_disable)
43 display->hw_config.panel_disable(display);
46 static int generic_panel_suspend(struct omap_display *display)
48 generic_panel_disable(display);
52 static int generic_panel_resume(struct omap_display *display)
54 return generic_panel_enable(display);
57 static struct omap_panel generic_panel = {
59 .name = "panel-generic",
60 .init = generic_panel_init,
61 .enable = generic_panel_enable,
62 .disable = generic_panel_disable,
63 .suspend = generic_panel_suspend,
64 .resume = generic_panel_resume,
67 /* 640 x 480 @ 60 Hz Reduced blanking VESA CVT 0.31M3-R */
79 .config = OMAP_DSS_LCD_TFT,
83 static int __init generic_panel_drv_init(void)
85 omap_dss_register_panel(&generic_panel);
89 static void __exit generic_panel_drv_exit(void)
91 omap_dss_unregister_panel(&generic_panel);
94 module_init(generic_panel_drv_init);
95 module_exit(generic_panel_drv_exit);
96 MODULE_LICENSE("GPL");