]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - drivers/video/omap/lcd_palmte.c
FB: Add support for OMAP framebuffer
[linux-2.6-omap-h63xx.git] / drivers / video / omap / lcd_palmte.c
1 /*
2  * File: drivers/video/omap/lcd_palmte.c
3  *
4  * LCD panel support for the Palm Tungsten E
5  *
6  * Original version : Romain Goyet
7  * Current version : Laurent Gonzalez
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/io.h>
28
29 #include <asm/arch/fpga.h>
30 #include <asm/arch/omapfb.h>
31
32 static int palmte_panel_init(struct lcd_panel *panel,
33                                 struct omapfb_device *fbdev)
34 {
35         return 0;
36 }
37
38 static void palmte_panel_cleanup(struct lcd_panel *panel)
39 {
40 }
41
42 static int palmte_panel_enable(struct lcd_panel *panel)
43 {
44         return 0;
45 }
46
47 static void palmte_panel_disable(struct lcd_panel *panel)
48 {
49 }
50
51 static unsigned long palmte_panel_get_caps(struct lcd_panel *panel)
52 {
53         return 0;
54 }
55
56 struct lcd_panel palmte_panel = {
57         .name           = "palmte",
58         .config         = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC |
59                           OMAP_LCDC_INV_HSYNC | OMAP_LCDC_HSVS_RISING_EDGE |
60                           OMAP_LCDC_HSVS_OPPOSITE,
61
62         .data_lines     = 16,
63         .bpp            = 8,
64         .pixel_clock    = 12000,
65         .x_res          = 320,
66         .y_res          = 320,
67         .hsw            = 4,
68         .hfp            = 8,
69         .hbp            = 28,
70         .vsw            = 1,
71         .vfp            = 8,
72         .vbp            = 7,
73         .pcd            = 0,
74
75         .init           = palmte_panel_init,
76         .cleanup        = palmte_panel_cleanup,
77         .enable         = palmte_panel_enable,
78         .disable        = palmte_panel_disable,
79         .get_caps       = palmte_panel_get_caps,
80 };
81
82 static int palmte_panel_probe(struct platform_device *pdev)
83 {
84         omapfb_register_panel(&palmte_panel);
85         return 0;
86 }
87
88 static int palmte_panel_remove(struct platform_device *pdev)
89 {
90         return 0;
91 }
92
93 static int palmte_panel_suspend(struct platform_device *pdev, pm_message_t mesg)
94 {
95         return 0;
96 }
97
98 static int palmte_panel_resume(struct platform_device *pdev)
99 {
100         return 0;
101 }
102
103 struct platform_driver palmte_panel_driver = {
104         .probe          = palmte_panel_probe,
105         .remove         = palmte_panel_remove,
106         .suspend        = palmte_panel_suspend,
107         .resume         = palmte_panel_resume,
108         .driver         = {
109                 .name   = "lcd_palmte",
110                 .owner  = THIS_MODULE,
111         },
112 };
113
114 static int palmte_panel_drv_init(void)
115 {
116         return platform_driver_register(&palmte_panel_driver);
117 }
118
119 static void palmte_panel_drv_cleanup(void)
120 {
121         platform_driver_unregister(&palmte_panel_driver);
122 }
123
124 module_init(palmte_panel_drv_init);
125 module_exit(palmte_panel_drv_cleanup);
126