]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - drivers/video/omap/lcd_h4.c
FB: Add support for OMAP framebuffer
[linux-2.6-omap-h63xx.git] / drivers / video / omap / lcd_h4.c
1 /*
2  * File: drivers/video/omap/lcd-h4.c
3  *
4  * LCD panel support for the TI OMAP H4 board
5  *
6  * Copyright (C) 2004 Nokia Corporation
7  * Author: Imre Deak <imre.deak@nokia.com>
8  *
9  * This program is free software; you can redistribute it and/or modify it
10  * under the terms of the GNU General Public License as published by the
11  * Free Software Foundation; either version 2 of the License, or (at your
12  * option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful, but
15  * WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License along
20  * with this program; if not, write to the Free Software Foundation, Inc.,
21  * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22  */
23
24 #include <linux/module.h>
25 #include <linux/platform_device.h>
26
27 #include <asm/arch/omapfb.h>
28
29 static int h4_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev)
30 {
31         return 0;
32 }
33
34 static void h4_panel_cleanup(struct lcd_panel *panel)
35 {
36 }
37
38 static int h4_panel_enable(struct lcd_panel *panel)
39 {
40         return 0;
41 }
42
43 static void h4_panel_disable(struct lcd_panel *panel)
44 {
45 }
46
47 static unsigned long h4_panel_get_caps(struct lcd_panel *panel)
48 {
49         return 0;
50 }
51
52 struct lcd_panel h4_panel = {
53         .name           = "h4",
54         .config         = OMAP_LCDC_PANEL_TFT,
55
56         .bpp            = 16,
57         .data_lines     = 16,
58         .x_res          = 240,
59         .y_res          = 320,
60         .pixel_clock    = 6250,
61         .hsw            = 15,
62         .hfp            = 15,
63         .hbp            = 60,
64         .vsw            = 1,
65         .vfp            = 1,
66         .vbp            = 1,
67
68         .init           = h4_panel_init,
69         .cleanup        = h4_panel_cleanup,
70         .enable         = h4_panel_enable,
71         .disable        = h4_panel_disable,
72         .get_caps       = h4_panel_get_caps,
73 };
74
75 static int h4_panel_probe(struct platform_device *pdev)
76 {
77         omapfb_register_panel(&h4_panel);
78         return 0;
79 }
80
81 static int h4_panel_remove(struct platform_device *pdev)
82 {
83         return 0;
84 }
85
86 static int h4_panel_suspend(struct platform_device *pdev, pm_message_t mesg)
87 {
88         return 0;
89 }
90
91 static int h4_panel_resume(struct platform_device *pdev)
92 {
93         return 0;
94 }
95
96 struct platform_driver h4_panel_driver = {
97         .probe          = h4_panel_probe,
98         .remove         = h4_panel_remove,
99         .suspend        = h4_panel_suspend,
100         .resume         = h4_panel_resume,
101         .driver         = {
102                 .name   = "lcd_h4",
103                 .owner  = THIS_MODULE,
104         },
105 };
106
107 static int h4_panel_drv_init(void)
108 {
109         return platform_driver_register(&h4_panel_driver);
110 }
111
112 static void h4_panel_drv_cleanup(void)
113 {
114         platform_driver_unregister(&h4_panel_driver);
115 }
116
117 module_init(h4_panel_drv_init);
118 module_exit(h4_panel_drv_cleanup);
119