aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap/lcd_apollon.c
diff options
context:
space:
mode:
authorKyungmin Park <kyungmin.park@samsung.com>2009-09-22 19:46:40 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 10:39:48 -0400
commit28ff0c12b7069f076f08a936df66f1d5052e9121 (patch)
tree7fde66d3f4e3d0c75c8fcf11351a294373cd9137 /drivers/video/omap/lcd_apollon.c
parentef72af408259f0ff26a733dfa2088d570a111550 (diff)
omapfb: add support for the Apollon LCD
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Imre Deak <imre.deak@nokia.com> Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/omap/lcd_apollon.c')
-rw-r--r--drivers/video/omap/lcd_apollon.c138
1 files changed, 138 insertions, 0 deletions
diff --git a/drivers/video/omap/lcd_apollon.c b/drivers/video/omap/lcd_apollon.c
new file mode 100644
index 000000000000..626ae3a532ff
--- /dev/null
+++ b/drivers/video/omap/lcd_apollon.c
@@ -0,0 +1,138 @@
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
33static 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
41static void apollon_panel_cleanup(struct lcd_panel *panel)
42{
43}
44
45static int apollon_panel_enable(struct lcd_panel *panel)
46{
47 return 0;
48}
49
50static void apollon_panel_disable(struct lcd_panel *panel)
51{
52}
53
54static unsigned long apollon_panel_get_caps(struct lcd_panel *panel)
55{
56 return 0;
57}
58
59struct 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
94static int apollon_panel_probe(struct platform_device *pdev)
95{
96 omapfb_register_panel(&apollon_panel);
97 return 0;
98}
99
100static int apollon_panel_remove(struct platform_device *pdev)
101{
102 return 0;
103}
104
105static int apollon_panel_suspend(struct platform_device *pdev,
106 pm_message_t mesg)
107{
108 return 0;
109}
110
111static int apollon_panel_resume(struct platform_device *pdev)
112{
113 return 0;
114}
115
116struct platform_driver apollon_panel_driver = {
117 .probe = apollon_panel_probe,
118 .remove = apollon_panel_remove,
119 .suspend = apollon_panel_suspend,
120 .resume = apollon_panel_resume,
121 .driver = {
122 .name = "apollon_lcd",
123 .owner = THIS_MODULE,
124 },
125};
126
127static int __init apollon_panel_drv_init(void)
128{
129 return platform_driver_register(&apollon_panel_driver);
130}
131
132static void __exit apollon_panel_drv_exit(void)
133{
134 platform_driver_unregister(&apollon_panel_driver);
135}
136
137module_init(apollon_panel_drv_init);
138module_exit(apollon_panel_drv_exit);