ext4: fix undefined behavior in ext4_fill_flex_info()
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / drivers / video / omap / lcd_apollon.c
blob626ae3a532ff0bb18783f0d5712d815e2192e911
1 /*
2 * LCD panel support for the Samsung OMAP2 Apollon board
4 * Copyright (C) 2005,2006 Samsung Electronics
5 * Author: Kyungmin Park <kyungmin.park@samsung.com>
7 * Derived from drivers/video/omap/lcd-h4.c
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.
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.
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.
24 #include <linux/module.h>
25 #include <linux/platform_device.h>
27 #include <mach/gpio.h>
28 #include <mach/mux.h>
29 #include <mach/omapfb.h>
31 /* #define USE_35INCH_LCD 1 */
33 static int apollon_panel_init(struct lcd_panel *panel,
34 struct omapfb_device *fbdev)
36 /* configure LCD PWR_EN */
37 omap_cfg_reg(M21_242X_GPIO11);
38 return 0;
41 static void apollon_panel_cleanup(struct lcd_panel *panel)
45 static int apollon_panel_enable(struct lcd_panel *panel)
47 return 0;
50 static void apollon_panel_disable(struct lcd_panel *panel)
54 static unsigned long apollon_panel_get_caps(struct lcd_panel *panel)
56 return 0;
59 struct lcd_panel apollon_panel = {
60 .name = "apollon",
61 .config = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC |
62 OMAP_LCDC_INV_HSYNC,
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,
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,
94 static int apollon_panel_probe(struct platform_device *pdev)
96 omapfb_register_panel(&apollon_panel);
97 return 0;
100 static int apollon_panel_remove(struct platform_device *pdev)
102 return 0;
105 static int apollon_panel_suspend(struct platform_device *pdev,
106 pm_message_t mesg)
108 return 0;
111 static int apollon_panel_resume(struct platform_device *pdev)
113 return 0;
116 struct 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,
127 static int __init apollon_panel_drv_init(void)
129 return platform_driver_register(&apollon_panel_driver);
132 static void __exit apollon_panel_drv_exit(void)
134 platform_driver_unregister(&apollon_panel_driver);
137 module_init(apollon_panel_drv_init);
138 module_exit(apollon_panel_drv_exit);