]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - drivers/video/omap/lcd_apollon.c
Merge branch 'omap-fixes'
[linux-2.6-omap-h63xx.git] / drivers / video / omap / lcd_apollon.c
1 /*
2  * LCD panel support for the Samsung OMAP2 Apollon board
3  *
4  * Copyright (C) 2005,2006 Samsung Electronics
5  * Author: Kyungmin Park <kyungmin.park@samsung.com>
6  *
7  * Derived from drivers/video/omap/lcd-h4.c
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 <mach/gpio.h>
28 #include <mach/mux.h>
29 #include <mach/omapfb.h>
30
31 /* #define USE_35INCH_LCD 1 */
32
33 static int apollon_panel_init(struct lcd_panel *panel,
34                                 struct omapfb_device *fbdev)
35 {
36         /* configure LCD PWR_EN */
37         omap_cfg_reg(M21_242X_GPIO11);
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         return 0;
48 }
49
50 static void apollon_panel_disable(struct lcd_panel *panel)
51 {
52 }
53
54 static unsigned long apollon_panel_get_caps(struct lcd_panel *panel)
55 {
56         return 0;
57 }
58
59 struct lcd_panel apollon_panel = {
60         .name           = "apollon",
61         .config         = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC |
62                           OMAP_LCDC_INV_HSYNC,
63
64         .bpp            = 16,
65         .data_lines     = 18,
66 #ifdef USE_35INCH_LCD
67         .x_res          = 240,
68         .y_res          = 320,
69         .hsw            = 2,
70         .hfp            = 3,
71         .hbp            = 9,
72         .vsw            = 4,
73         .vfp            = 3,
74         .vbp            = 5,
75 #else
76         .x_res          = 480,
77         .y_res          = 272,
78         .hsw            = 41,
79         .hfp            = 2,
80         .hbp            = 2,
81         .vsw            = 10,
82         .vfp            = 2,
83         .vbp            = 2,
84 #endif
85         .pixel_clock    = 6250,
86
87         .init           = apollon_panel_init,
88         .cleanup        = apollon_panel_cleanup,
89         .enable         = apollon_panel_enable,
90         .disable        = apollon_panel_disable,
91         .get_caps       = apollon_panel_get_caps,
92 };
93
94 static int apollon_panel_probe(struct platform_device *pdev)
95 {
96         omapfb_register_panel(&apollon_panel);
97         return 0;
98 }
99
100 static int apollon_panel_remove(struct platform_device *pdev)
101 {
102         return 0;
103 }
104
105 static int apollon_panel_suspend(struct platform_device *pdev, pm_message_t mesg)
106 {
107         return 0;
108 }
109
110 static int apollon_panel_resume(struct platform_device *pdev)
111 {
112         return 0;
113 }
114
115 struct platform_driver apollon_panel_driver = {
116         .probe          = apollon_panel_probe,
117         .remove         = apollon_panel_remove,
118         .suspend        = apollon_panel_suspend,
119         .resume         = apollon_panel_resume,
120         .driver         = {
121                 .name   = "apollon_lcd",
122                 .owner  = THIS_MODULE,
123         },
124 };
125
126 static int __init apollon_panel_drv_init(void)
127 {
128         return platform_driver_register(&apollon_panel_driver);
129 }
130
131 static void __exit apollon_panel_drv_exit(void)
132 {
133         platform_driver_unregister(&apollon_panel_driver);
134 }
135
136 module_init(apollon_panel_drv_init);
137 module_exit(apollon_panel_drv_exit);