]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - drivers/video/omap/lcd_apollon.c
Merge with /home/tmlind/src/kernel/linux-2.6
[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 OMAPFB_DBG 1 */
34
35 /* #define USE_35INCH_LCD 1 */
36
37 #include "debug.h"
38
39 static int apollon_panel_init(struct omapfb_device *fbdev)
40 {
41         DBGENTER(1);
42         DBGLEAVE(1);
43         return 0;
44 }
45
46 static void apollon_panel_cleanup(void)
47 {
48         DBGENTER(1);
49         DBGLEAVE(1);
50 }
51
52 static int apollon_panel_enable(void)
53 {
54
55         DBGENTER(1);
56
57         /* configure LCD PWR_EN */
58         omap_cfg_reg(M21_242X_GPIO11);
59
60         DBGLEAVE(1);
61         return 0;
62 }
63
64 static void apollon_panel_disable(void)
65 {
66         DBGENTER(1);
67         DBGLEAVE(1);
68 }
69
70 static unsigned long apollon_panel_get_caps(void)
71 {
72         return 0;
73 }
74
75 struct lcd_panel apollon_panel = {
76         .name           = "apollon",
77         .config         = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC |
78                           OMAP_LCDC_INV_HSYNC,
79
80         .bpp            = 16,
81         .data_lines     = 18,
82 #ifdef USE_35INCH_LCD
83         .x_res          = 240,
84         .y_res          = 320,
85         .hsw            = 2,
86         .hfp            = 3,
87         .hbp            = 9,
88         .vsw            = 4,
89         .vfp            = 3,
90         .vbp            = 5,
91 #else
92         .x_res          = 480,
93         .y_res          = 272,
94         .hsw            = 41,
95         .hfp            = 2,
96         .hbp            = 2,
97         .vsw            = 10,
98         .vfp            = 2,
99         .vbp            = 2,
100 #endif
101         .pixel_clock    = 6250,
102
103         .init           = apollon_panel_init,
104         .cleanup        = apollon_panel_cleanup,
105         .enable         = apollon_panel_enable,
106         .disable        = apollon_panel_disable,
107         .get_caps       = apollon_panel_get_caps,
108 };
109
110 static int apollon_panel_probe(struct platform_device *pdev)
111 {
112         DBGENTER(1);
113         omapfb_register_panel(&apollon_panel);
114         return 0;
115 }
116
117 static int apollon_panel_remove(struct platform_device *pdev)
118 {
119         DBGENTER(1);
120         return 0;
121 }
122
123 static int apollon_panel_suspend(struct platform_device *pdev, pm_message_t mesg)
124 {
125         DBGENTER(1);
126         return 0;
127 }
128
129 static int apollon_panel_resume(struct platform_device *pdev)
130 {
131         DBGENTER(1);
132         return 0;
133 }
134
135 struct platform_driver apollon_panel_driver = {
136         .probe          = apollon_panel_probe,
137         .remove         = apollon_panel_remove,
138         .suspend        = apollon_panel_suspend,
139         .resume         = apollon_panel_resume,
140         .driver         = {
141                 .name   = "apollon_lcd",
142                 .owner  = THIS_MODULE,
143         },
144 };
145
146 static int __init apollon_panel_drv_init(void)
147 {
148         return platform_driver_register(&apollon_panel_driver);
149 }
150
151 static void __exit apollon_panel_drv_exit(void)
152 {
153         platform_driver_unregister(&apollon_panel_driver);
154 }
155
156 module_init(apollon_panel_drv_init);
157 module_exit(apollon_panel_drv_exit);