]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - drivers/video/omap/lcd_apollon.c
ARM: OMAP: omapfb: update LCD drivers
[linux-2.6-omap-h63xx.git] / drivers / video / omap / lcd_apollon.c
1 /*
2  * File: drivers/video/omap/lcd_apollon.c
3  *
4  * LCD panel support for the Samsung OMAP2 Apollon board
5  *
6  * Copyright (C) 2005,2006 Samsung Electronics
7  * Author: Kyungmin Park <kyungmin.park@samsung.com>
8  *
9  * Derived from drivers/video/omap/lcd-h4.c
10  *
11  * This program is free software; you can redistribute it and/or modify it
12  * under the terms of the GNU General Public License as published by the
13  * Free Software Foundation; either version 2 of the License, or (at your
14  * option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful, but
17  * WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License along
22  * with this program; if not, write to the Free Software Foundation, Inc.,
23  * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
24  */
25
26 #include <linux/module.h>
27 #include <linux/platform_device.h>
28
29 #include <asm/arch/gpio.h>
30 #include <asm/arch/mux.h>
31 #include <asm/arch/omapfb.h>
32
33 /* #define USE_35INCH_LCD 1 */
34
35 static int apollon_panel_init(struct lcd_panel *panel,
36                                 struct omapfb_device *fbdev)
37 {
38         return 0;
39 }
40
41 static void apollon_panel_cleanup(struct lcd_panel *panel)
42 {
43 }
44
45 static int apollon_panel_enable(struct lcd_panel *panel)
46 {
47
48         /* configure LCD PWR_EN */
49         omap_cfg_reg(M21_242X_GPIO11);
50
51         return 0;
52 }
53
54 static void apollon_panel_disable(struct lcd_panel *panel)
55 {
56 }
57
58 static unsigned long apollon_panel_get_caps(struct lcd_panel *panel)
59 {
60         return 0;
61 }
62
63 struct lcd_panel apollon_panel = {
64         .name           = "apollon",
65         .config         = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC |
66                           OMAP_LCDC_INV_HSYNC,
67
68         .bpp            = 16,
69         .data_lines     = 18,
70 #ifdef USE_35INCH_LCD
71         .x_res          = 240,
72         .y_res          = 320,
73         .hsw            = 2,
74         .hfp            = 3,
75         .hbp            = 9,
76         .vsw            = 4,
77         .vfp            = 3,
78         .vbp            = 5,
79 #else
80         .x_res          = 480,
81         .y_res          = 272,
82         .hsw            = 41,
83         .hfp            = 2,
84         .hbp            = 2,
85         .vsw            = 10,
86         .vfp            = 2,
87         .vbp            = 2,
88 #endif
89         .pixel_clock    = 6250,
90
91         .init           = apollon_panel_init,
92         .cleanup        = apollon_panel_cleanup,
93         .enable         = apollon_panel_enable,
94         .disable        = apollon_panel_disable,
95         .get_caps       = apollon_panel_get_caps,
96 };
97
98 static int apollon_panel_probe(struct platform_device *pdev)
99 {
100         omapfb_register_panel(&apollon_panel);
101         return 0;
102 }
103
104 static int apollon_panel_remove(struct platform_device *pdev)
105 {
106         return 0;
107 }
108
109 static int apollon_panel_suspend(struct platform_device *pdev, pm_message_t mesg)
110 {
111         return 0;
112 }
113
114 static int apollon_panel_resume(struct platform_device *pdev)
115 {
116         return 0;
117 }
118
119 struct platform_driver apollon_panel_driver = {
120         .probe          = apollon_panel_probe,
121         .remove         = apollon_panel_remove,
122         .suspend        = apollon_panel_suspend,
123         .resume         = apollon_panel_resume,
124         .driver         = {
125                 .name   = "apollon_lcd",
126                 .owner  = THIS_MODULE,
127         },
128 };
129
130 static int __init apollon_panel_drv_init(void)
131 {
132         return platform_driver_register(&apollon_panel_driver);
133 }
134
135 static void __exit apollon_panel_drv_exit(void)
136 {
137         platform_driver_unregister(&apollon_panel_driver);
138 }
139
140 module_init(apollon_panel_drv_init);
141 module_exit(apollon_panel_drv_exit);