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