]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - drivers/video/omap/lcd_palmz71.c
FB: Add support for OMAP framebuffer
[linux-2.6-omap-h63xx.git] / drivers / video / omap / lcd_palmz71.c
1 /*
2  * File: drivers/video/omap/lcd_palmz71.c
3  *
4  * LCD panel support for the Palm Zire71
5  *
6  * Original version : Romain Goyet
7  * Current version : Laurent Gonzalez
8  * Modified for zire71 : Marek Vasut
9  *
10  * This program is free software; you can redistribute it and/or modify it
11  * under the terms of the GNU General Public License as published by the
12  * Free Software Foundation; either version 2 of the License, or (at your
13  * option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful, but
16  * WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18  * General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License along
21  * with this program; if not, write to the Free Software Foundation, Inc.,
22  * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23  */
24
25 #include <linux/module.h>
26 #include <linux/platform_device.h>
27
28 #include <asm/io.h>
29
30 #include <asm/arch/gpio.h>
31 #include <asm/arch/omapfb.h>
32
33 static int palmz71_panel_init(struct lcd_panel *panel,
34                               struct omapfb_device *fbdev)
35 {
36         return 0;
37 }
38
39 static void palmz71_panel_cleanup(struct lcd_panel *panel)
40 {
41
42 }
43
44 static int palmz71_panel_enable(struct lcd_panel *panel)
45 {
46         return 0;
47 }
48
49 static void palmz71_panel_disable(struct lcd_panel *panel)
50 {
51 }
52
53 static unsigned long palmz71_panel_get_caps(struct lcd_panel *panel)
54 {
55         return OMAPFB_CAPS_SET_BACKLIGHT;
56 }
57
58 struct lcd_panel palmz71_panel = {
59         .name           = "palmz71",
60         .config         = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC |
61                           OMAP_LCDC_INV_HSYNC | OMAP_LCDC_HSVS_RISING_EDGE |
62                           OMAP_LCDC_HSVS_OPPOSITE,
63         .data_lines     = 16,
64         .bpp            = 16,
65         .pixel_clock    = 24000,
66         .x_res          = 320,
67         .y_res          = 320,
68         .hsw            = 4,
69         .hfp            = 8,
70         .hbp            = 28,
71         .vsw            = 1,
72         .vfp            = 8,
73         .vbp            = 7,
74         .pcd            = 0,
75
76         .init           = palmz71_panel_init,
77         .cleanup        = palmz71_panel_cleanup,
78         .enable         = palmz71_panel_enable,
79         .disable        = palmz71_panel_disable,
80         .get_caps       = palmz71_panel_get_caps,
81 };
82
83 static int palmz71_panel_probe(struct platform_device *pdev)
84 {
85         omapfb_register_panel(&palmz71_panel);
86         return 0;
87 }
88
89 static int palmz71_panel_remove(struct platform_device *pdev)
90 {
91         return 0;
92 }
93
94 static int palmz71_panel_suspend(struct platform_device *pdev, pm_message_t mesg)
95 {
96         return 0;
97 }
98
99 static int palmz71_panel_resume(struct platform_device *pdev)
100 {
101         return 0;
102 }
103
104 struct platform_driver palmz71_panel_driver = {
105         .probe          = palmz71_panel_probe,
106         .remove         = palmz71_panel_remove,
107         .suspend        = palmz71_panel_suspend,
108         .resume         = palmz71_panel_resume,
109         .driver         = {
110                 .name   = "lcd_palmz71",
111                 .owner  = THIS_MODULE,
112         },
113 };
114
115 static int palmz71_panel_drv_init(void)
116 {
117         return platform_driver_register(&palmz71_panel_driver);
118 }
119
120 static void palmz71_panel_drv_cleanup(void)
121 {
122         platform_driver_unregister(&palmz71_panel_driver);
123 }
124
125 module_init(palmz71_panel_drv_init);
126 module_exit(palmz71_panel_drv_cleanup);