]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - drivers/video/omap/lcd_inn1510.c
FB: Add support for OMAP framebuffer
[linux-2.6-omap-h63xx.git] / drivers / video / omap / lcd_inn1510.c
1 /*
2  * File: drivers/video/omap/lcd-inn1510.c
3  *
4  * LCD panel support for the TI OMAP1510 Innovator board
5  *
6  * Copyright (C) 2004 Nokia Corporation
7  * Author: Imre Deak <imre.deak@nokia.com>
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 <asm/io.h>
28
29 #include <asm/arch/fpga.h>
30 #include <asm/arch/omapfb.h>
31
32 static int innovator1510_panel_init(struct lcd_panel *panel,
33                                     struct omapfb_device *fbdev)
34 {
35         return 0;
36 }
37
38 static void innovator1510_panel_cleanup(struct lcd_panel *panel)
39 {
40 }
41
42 static int innovator1510_panel_enable(struct lcd_panel *panel)
43 {
44         fpga_write(0x7, OMAP1510_FPGA_LCD_PANEL_CONTROL);
45         return 0;
46 }
47
48 static void innovator1510_panel_disable(struct lcd_panel *panel)
49 {
50         fpga_write(0x0, OMAP1510_FPGA_LCD_PANEL_CONTROL);
51 }
52
53 static unsigned long innovator1510_panel_get_caps(struct lcd_panel *panel)
54 {
55         return 0;
56 }
57
58 struct lcd_panel innovator1510_panel = {
59         .name           = "inn1510",
60         .config         = OMAP_LCDC_PANEL_TFT,
61
62         .bpp            = 16,
63         .data_lines     = 16,
64         .x_res          = 240,
65         .y_res          = 320,
66         .pixel_clock    = 12500,
67         .hsw            = 40,
68         .hfp            = 40,
69         .hbp            = 72,
70         .vsw            = 1,
71         .vfp            = 1,
72         .vbp            = 0,
73         .pcd            = 12,
74
75         .init           = innovator1510_panel_init,
76         .cleanup        = innovator1510_panel_cleanup,
77         .enable         = innovator1510_panel_enable,
78         .disable        = innovator1510_panel_disable,
79         .get_caps       = innovator1510_panel_get_caps,
80 };
81
82 static int innovator1510_panel_probe(struct platform_device *pdev)
83 {
84         omapfb_register_panel(&innovator1510_panel);
85         return 0;
86 }
87
88 static int innovator1510_panel_remove(struct platform_device *pdev)
89 {
90         return 0;
91 }
92
93 static int innovator1510_panel_suspend(struct platform_device *pdev, pm_message_t mesg)
94 {
95         return 0;
96 }
97
98 static int innovator1510_panel_resume(struct platform_device *pdev)
99 {
100         return 0;
101 }
102
103 struct platform_driver innovator1510_panel_driver = {
104         .probe          = innovator1510_panel_probe,
105         .remove         = innovator1510_panel_remove,
106         .suspend        = innovator1510_panel_suspend,
107         .resume         = innovator1510_panel_resume,
108         .driver         = {
109                 .name   = "lcd_inn1510",
110                 .owner  = THIS_MODULE,
111         },
112 };
113
114 static int innovator1510_panel_drv_init(void)
115 {
116         return platform_driver_register(&innovator1510_panel_driver);
117 }
118
119 static void innovator1510_panel_drv_cleanup(void)
120 {
121         platform_driver_unregister(&innovator1510_panel_driver);
122 }
123
124 module_init(innovator1510_panel_drv_init);
125 module_exit(innovator1510_panel_drv_cleanup);
126