2 * LCD panel support for the TI OMAP1510 Innovator board
4 * Copyright (C) 2004 Nokia Corporation
5 * Author: Imre Deak <imre.deak@nokia.com>
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 #include <linux/module.h>
23 #include <linux/platform_device.h>
26 #include <asm/arch/fpga.h>
27 #include <asm/arch/omapfb.h>
29 static int innovator1510_panel_init(struct lcd_panel *panel,
30 struct omapfb_device *fbdev)
35 static void innovator1510_panel_cleanup(struct lcd_panel *panel)
39 static int innovator1510_panel_enable(struct lcd_panel *panel)
41 fpga_write(0x7, OMAP1510_FPGA_LCD_PANEL_CONTROL);
45 static void innovator1510_panel_disable(struct lcd_panel *panel)
47 fpga_write(0x0, OMAP1510_FPGA_LCD_PANEL_CONTROL);
50 static unsigned long innovator1510_panel_get_caps(struct lcd_panel *panel)
55 struct lcd_panel innovator1510_panel = {
57 .config = OMAP_LCDC_PANEL_TFT,
72 .init = innovator1510_panel_init,
73 .cleanup = innovator1510_panel_cleanup,
74 .enable = innovator1510_panel_enable,
75 .disable = innovator1510_panel_disable,
76 .get_caps = innovator1510_panel_get_caps,
79 static int innovator1510_panel_probe(struct platform_device *pdev)
81 omapfb_register_panel(&innovator1510_panel);
85 static int innovator1510_panel_remove(struct platform_device *pdev)
90 static int innovator1510_panel_suspend(struct platform_device *pdev,
96 static int innovator1510_panel_resume(struct platform_device *pdev)
101 struct platform_driver innovator1510_panel_driver = {
102 .probe = innovator1510_panel_probe,
103 .remove = innovator1510_panel_remove,
104 .suspend = innovator1510_panel_suspend,
105 .resume = innovator1510_panel_resume,
107 .name = "lcd_inn1510",
108 .owner = THIS_MODULE,
112 static int innovator1510_panel_drv_init(void)
114 return platform_driver_register(&innovator1510_panel_driver);
117 static void innovator1510_panel_drv_cleanup(void)
119 platform_driver_unregister(&innovator1510_panel_driver);
122 module_init(innovator1510_panel_drv_init);
123 module_exit(innovator1510_panel_drv_cleanup);