2 * File: drivers/video/omap/lcd_apollon.c
4 * LCD panel support for the Samsung OMAP2 Apollon board
6 * Copyright (C) 2005,2006 Samsung Electronics
7 * Author: Kyungmin Park <kyungmin.park@samsung.com>
9 * Derived from drivers/video/omap/lcd-h4.c
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.
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.
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.
26 #include <linux/module.h>
27 #include <linux/platform_device.h>
29 #include <asm/arch/gpio.h>
30 #include <asm/arch/mux.h>
31 #include <asm/arch/omapfb.h>
33 /* #define OMAPFB_DBG 1 */
35 /* #define USE_35INCH_LCD 1 */
39 static int apollon_panel_init(struct omapfb_device *fbdev)
46 static void apollon_panel_cleanup(void)
52 static int apollon_panel_enable(void)
57 /* configure LCD PWR_EN */
58 omap_cfg_reg(M21_242X_GPIO11);
64 static void apollon_panel_disable(void)
70 static unsigned long apollon_panel_get_caps(void)
75 struct lcd_panel apollon_panel = {
77 .config = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC |
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,
110 static int apollon_panel_probe(struct platform_device *pdev)
113 omapfb_register_panel(&apollon_panel);
117 static int apollon_panel_remove(struct platform_device *pdev)
123 static int apollon_panel_suspend(struct platform_device *pdev, pm_message_t mesg)
129 static int apollon_panel_resume(struct platform_device *pdev)
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,
141 .name = "apollon_lcd",
142 .owner = THIS_MODULE,
146 static int __init apollon_panel_drv_init(void)
148 return platform_driver_register(&apollon_panel_driver);
151 static void __exit apollon_panel_drv_exit(void)
153 platform_driver_unregister(&apollon_panel_driver);
156 module_init(apollon_panel_drv_init);
157 module_exit(apollon_panel_drv_exit);