diff options
Diffstat (limited to 'drivers/video/omap')
-rw-r--r-- | drivers/video/omap/Makefile | 1 | ||||
-rw-r--r-- | drivers/video/omap/lcd_palmtt.c | 127 |
2 files changed, 128 insertions, 0 deletions
diff --git a/drivers/video/omap/Makefile b/drivers/video/omap/Makefile index 51cf34bc23f0..efe98661cab5 100644 --- a/drivers/video/omap/Makefile +++ b/drivers/video/omap/Makefile | |||
@@ -18,6 +18,7 @@ objs-y$(CONFIG_FB_OMAP_LCDC_BLIZZARD) += blizzard.o | |||
18 | objs-y$(CONFIG_MACH_OMAP_H4) += lcd_h4.o | 18 | objs-y$(CONFIG_MACH_OMAP_H4) += lcd_h4.o |
19 | objs-y$(CONFIG_MACH_OMAP_H3) += lcd_h3.o | 19 | objs-y$(CONFIG_MACH_OMAP_H3) += lcd_h3.o |
20 | objs-y$(CONFIG_MACH_OMAP_PALMTE) += lcd_palmte.o | 20 | objs-y$(CONFIG_MACH_OMAP_PALMTE) += lcd_palmte.o |
21 | objs-y$(CONFIG_MACH_OMAP_PALMTT) += lcd_palmtt.o | ||
21 | 22 | ||
22 | omapfb-objs := $(objs-yy) | 23 | omapfb-objs := $(objs-yy) |
23 | 24 | ||
diff --git a/drivers/video/omap/lcd_palmtt.c b/drivers/video/omap/lcd_palmtt.c new file mode 100644 index 000000000000..4bb349f54356 --- /dev/null +++ b/drivers/video/omap/lcd_palmtt.c | |||
@@ -0,0 +1,127 @@ | |||
1 | /* | ||
2 | * LCD panel support for Palm Tungsten|T | ||
3 | * Current version : Marek Vasut <marek.vasut@gmail.com> | ||
4 | * | ||
5 | * Modified from lcd_inn1510.c | ||
6 | * | ||
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. | ||
11 | * | ||
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. | ||
16 | * | ||
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. | ||
20 | */ | ||
21 | |||
22 | /* | ||
23 | GPIO11 - backlight | ||
24 | GPIO12 - screen blanking | ||
25 | GPIO13 - screen blanking | ||
26 | */ | ||
27 | |||
28 | #include <linux/platform_device.h> | ||
29 | #include <linux/module.h> | ||
30 | #include <linux/io.h> | ||
31 | |||
32 | #include <asm/arch/gpio.h> | ||
33 | #include <asm/arch/omapfb.h> | ||
34 | |||
35 | static int palmtt_panel_init(struct lcd_panel *panel, | ||
36 | struct omapfb_device *fbdev) | ||
37 | { | ||
38 | return 0; | ||
39 | } | ||
40 | |||
41 | static void palmtt_panel_cleanup(struct lcd_panel *panel) | ||
42 | { | ||
43 | } | ||
44 | |||
45 | static int palmtt_panel_enable(struct lcd_panel *panel) | ||
46 | { | ||
47 | return 0; | ||
48 | } | ||
49 | |||
50 | static void palmtt_panel_disable(struct lcd_panel *panel) | ||
51 | { | ||
52 | } | ||
53 | |||
54 | static unsigned long palmtt_panel_get_caps(struct lcd_panel *panel) | ||
55 | { | ||
56 | return OMAPFB_CAPS_SET_BACKLIGHT; | ||
57 | } | ||
58 | |||
59 | struct lcd_panel palmtt_panel = { | ||
60 | .name = "palmtt", | ||
61 | .config = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC | | ||
62 | OMAP_LCDC_INV_HSYNC | OMAP_LCDC_HSVS_RISING_EDGE | | ||
63 | OMAP_LCDC_HSVS_OPPOSITE, | ||
64 | .bpp = 16, | ||
65 | .data_lines = 16, | ||
66 | .x_res = 320, | ||
67 | .y_res = 320, | ||
68 | .pixel_clock = 10000, | ||
69 | .hsw = 4, | ||
70 | .hfp = 8, | ||
71 | .hbp = 28, | ||
72 | .vsw = 1, | ||
73 | .vfp = 8, | ||
74 | .vbp = 7, | ||
75 | .pcd = 0, | ||
76 | |||
77 | .init = palmtt_panel_init, | ||
78 | .cleanup = palmtt_panel_cleanup, | ||
79 | .enable = palmtt_panel_enable, | ||
80 | .disable = palmtt_panel_disable, | ||
81 | .get_caps = palmtt_panel_get_caps, | ||
82 | }; | ||
83 | |||
84 | static int palmtt_panel_probe(struct platform_device *pdev) | ||
85 | { | ||
86 | omapfb_register_panel(&palmtt_panel); | ||
87 | return 0; | ||
88 | } | ||
89 | |||
90 | static int palmtt_panel_remove(struct platform_device *pdev) | ||
91 | { | ||
92 | return 0; | ||
93 | } | ||
94 | |||
95 | static int palmtt_panel_suspend(struct platform_device *pdev, pm_message_t mesg) | ||
96 | { | ||
97 | return 0; | ||
98 | } | ||
99 | |||
100 | static int palmtt_panel_resume(struct platform_device *pdev) | ||
101 | { | ||
102 | return 0; | ||
103 | } | ||
104 | |||
105 | struct platform_driver palmtt_panel_driver = { | ||
106 | .probe = palmtt_panel_probe, | ||
107 | .remove = palmtt_panel_remove, | ||
108 | .suspend = palmtt_panel_suspend, | ||
109 | .resume = palmtt_panel_resume, | ||
110 | .driver = { | ||
111 | .name = "lcd_palmtt", | ||
112 | .owner = THIS_MODULE, | ||
113 | }, | ||
114 | }; | ||
115 | |||
116 | static int palmtt_panel_drv_init(void) | ||
117 | { | ||
118 | return platform_driver_register(&palmtt_panel_driver); | ||
119 | } | ||
120 | |||
121 | static void palmtt_panel_drv_cleanup(void) | ||
122 | { | ||
123 | platform_driver_unregister(&palmtt_panel_driver); | ||
124 | } | ||
125 | |||
126 | module_init(palmtt_panel_drv_init); | ||
127 | module_exit(palmtt_panel_drv_cleanup); | ||