]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - drivers/video/omap/lcd_palmtt.c
FB: Add support for OMAP framebuffer
[linux-2.6-omap-h63xx.git] / drivers / video / omap / lcd_palmtt.c
1 /*
2  * File: drivers/video/omap/lcd_palmtt.c
3  *
4  * LCD panel support for Palm Tungsten|T
5  * Current version : Marek Vasut <marek.vasut@gmail.com>
6  *
7  * Modified from lcd_inn1510.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 /*
25 GPIO11 - backlight
26 GPIO12 - screen blanking
27 GPIO13 - screen blanking
28 */
29
30 #include <linux/platform_device.h>
31 #include <linux/module.h>
32
33 #include <asm/io.h>
34
35 #include <asm/arch/gpio.h>
36 #include "asm/arch/omapfb.h"
37
38 static int palmtt_panel_init(struct lcd_panel *panel,
39         struct omapfb_device *fbdev)
40 {
41         return 0;
42 }
43
44 static void palmtt_panel_cleanup(struct lcd_panel *panel)
45 {
46 }
47
48 static int palmtt_panel_enable(struct lcd_panel *panel)
49 {
50         return 0;
51 }
52
53 static void palmtt_panel_disable(struct lcd_panel *panel)
54 {
55 }
56
57 static unsigned long palmtt_panel_get_caps(struct lcd_panel *panel)
58 {
59         return OMAPFB_CAPS_SET_BACKLIGHT;
60 }
61
62 struct lcd_panel palmtt_panel = {
63         .name           = "palmtt",
64         .config         = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC |
65                         OMAP_LCDC_INV_HSYNC | OMAP_LCDC_HSVS_RISING_EDGE |
66                         OMAP_LCDC_HSVS_OPPOSITE,
67         .bpp            = 16,
68         .data_lines     = 16,
69         .x_res          = 320,
70         .y_res          = 320,
71         .pixel_clock    = 10000,
72         .hsw            = 4,
73         .hfp            = 8,
74         .hbp            = 28,
75         .vsw            = 1,
76         .vfp            = 8,
77         .vbp            = 7,
78         .pcd            = 0,
79
80         .init= palmtt_panel_init,
81         .cleanup        = palmtt_panel_cleanup,
82         .enable= palmtt_panel_enable,
83         .disable        = palmtt_panel_disable,
84         .get_caps       = palmtt_panel_get_caps,
85 };
86
87 static int palmtt_panel_probe(struct platform_device *pdev)
88 {
89         omapfb_register_panel(&palmtt_panel);
90         return 0;
91 }
92
93 static int palmtt_panel_remove(struct platform_device *pdev)
94 {
95         return 0;
96 }
97
98 static int palmtt_panel_suspend(struct platform_device *pdev, pm_message_t mesg)
99 {
100         return 0;
101 }
102
103 static int palmtt_panel_resume(struct platform_device *pdev)
104 {
105         return 0;
106 }
107
108 struct platform_driver palmtt_panel_driver = {
109         .probe          = palmtt_panel_probe,
110         .remove         = palmtt_panel_remove,
111         .suspend        = palmtt_panel_suspend,
112         .resume         = palmtt_panel_resume,
113         .driver         = {
114                 .name   = "lcd_palmtt",
115                 .owner  = THIS_MODULE,
116         },
117 };
118
119 static int palmtt_panel_drv_init(void)
120 {
121         return platform_driver_register(&palmtt_panel_driver);
122 }
123
124 static void palmtt_panel_drv_cleanup(void)
125 {
126         platform_driver_unregister(&palmtt_panel_driver);
127 }
128
129 module_init(palmtt_panel_drv_init);
130 module_exit(palmtt_panel_drv_cleanup);