diff options
Diffstat (limited to 'drivers/video/omap')
-rw-r--r-- | drivers/video/omap/Kconfig | 29 | ||||
-rw-r--r-- | drivers/video/omap/Makefile | 8 | ||||
-rw-r--r-- | drivers/video/omap/lcd_2430sdp.c | 203 | ||||
-rw-r--r-- | drivers/video/omap/lcd_apollon.c | 136 | ||||
-rw-r--r-- | drivers/video/omap/lcd_h4.c | 117 | ||||
-rw-r--r-- | drivers/video/omap/lcd_ldp.c | 201 | ||||
-rw-r--r-- | drivers/video/omap/lcd_omap3beagle.c | 130 | ||||
-rw-r--r-- | drivers/video/omap/lcd_omap3evm.c | 193 | ||||
-rw-r--r-- | drivers/video/omap/lcd_overo.c | 180 |
9 files changed, 0 insertions, 1197 deletions
diff --git a/drivers/video/omap/Kconfig b/drivers/video/omap/Kconfig index 196fa2e7f438..84ff23208c25 100644 --- a/drivers/video/omap/Kconfig +++ b/drivers/video/omap/Kconfig | |||
@@ -9,35 +9,6 @@ config FB_OMAP | |||
9 | help | 9 | help |
10 | Frame buffer driver for OMAP based boards. | 10 | Frame buffer driver for OMAP based boards. |
11 | 11 | ||
12 | config FB_OMAP_LCD_VGA | ||
13 | bool "Use LCD in VGA mode" | ||
14 | depends on MACH_OMAP_3430SDP || MACH_OMAP_LDP | ||
15 | help | ||
16 | Set LCD resolution as VGA (640 X 480). | ||
17 | Default resolution without this option is QVGA(320 X 240). | ||
18 | Please take a look at drivers/video/omap/lcd_ldp.c file | ||
19 | for lcd driver code. | ||
20 | choice | ||
21 | depends on FB_OMAP && MACH_OVERO | ||
22 | prompt "Screen resolution" | ||
23 | default FB_OMAP_079M3R | ||
24 | help | ||
25 | Selected desired screen resolution | ||
26 | |||
27 | config FB_OMAP_031M3R | ||
28 | boolean "640 x 480 @ 60 Hz Reduced blanking" | ||
29 | |||
30 | config FB_OMAP_048M3R | ||
31 | boolean "800 x 600 @ 60 Hz Reduced blanking" | ||
32 | |||
33 | config FB_OMAP_079M3R | ||
34 | boolean "1024 x 768 @ 60 Hz Reduced blanking" | ||
35 | |||
36 | config FB_OMAP_092M9R | ||
37 | boolean "1280 x 720 @ 60 Hz Reduced blanking" | ||
38 | |||
39 | endchoice | ||
40 | |||
41 | config FB_OMAP_LCDC_EXTERNAL | 12 | config FB_OMAP_LCDC_EXTERNAL |
42 | bool "External LCD controller support" | 13 | bool "External LCD controller support" |
43 | depends on FB_OMAP | 14 | depends on FB_OMAP |
diff --git a/drivers/video/omap/Makefile b/drivers/video/omap/Makefile index 25db55696e14..ef78550917ff 100644 --- a/drivers/video/omap/Makefile +++ b/drivers/video/omap/Makefile | |||
@@ -17,7 +17,6 @@ objs-y$(CONFIG_FB_OMAP_LCDC_HWA742) += hwa742.o | |||
17 | objs-y$(CONFIG_FB_OMAP_LCDC_BLIZZARD) += blizzard.o | 17 | objs-y$(CONFIG_FB_OMAP_LCDC_BLIZZARD) += blizzard.o |
18 | 18 | ||
19 | objs-y$(CONFIG_MACH_AMS_DELTA) += lcd_ams_delta.o | 19 | objs-y$(CONFIG_MACH_AMS_DELTA) += lcd_ams_delta.o |
20 | objs-y$(CONFIG_MACH_OMAP_H4) += lcd_h4.o | ||
21 | objs-y$(CONFIG_MACH_OMAP_H3) += lcd_h3.o | 20 | objs-y$(CONFIG_MACH_OMAP_H3) += lcd_h3.o |
22 | objs-y$(CONFIG_MACH_OMAP_PALMTE) += lcd_palmte.o | 21 | objs-y$(CONFIG_MACH_OMAP_PALMTE) += lcd_palmte.o |
23 | objs-y$(CONFIG_MACH_OMAP_PALMTT) += lcd_palmtt.o | 22 | objs-y$(CONFIG_MACH_OMAP_PALMTT) += lcd_palmtt.o |
@@ -26,14 +25,7 @@ objs-$(CONFIG_ARCH_OMAP16XX)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1610.o | |||
26 | objs-$(CONFIG_ARCH_OMAP15XX)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1510.o | 25 | objs-$(CONFIG_ARCH_OMAP15XX)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1510.o |
27 | objs-y$(CONFIG_MACH_OMAP_OSK) += lcd_osk.o | 26 | objs-y$(CONFIG_MACH_OMAP_OSK) += lcd_osk.o |
28 | 27 | ||
29 | objs-y$(CONFIG_MACH_OMAP_APOLLON) += lcd_apollon.o | ||
30 | objs-y$(CONFIG_MACH_OMAP_2430SDP) += lcd_2430sdp.o | ||
31 | objs-y$(CONFIG_MACH_OMAP_3430SDP) += lcd_2430sdp.o | ||
32 | objs-y$(CONFIG_MACH_OMAP_LDP) += lcd_ldp.o | ||
33 | objs-y$(CONFIG_MACH_OMAP3EVM) += lcd_omap3evm.o | ||
34 | objs-y$(CONFIG_MACH_OMAP3_BEAGLE) += lcd_omap3beagle.o | ||
35 | objs-y$(CONFIG_FB_OMAP_LCD_MIPID) += lcd_mipid.o | 28 | objs-y$(CONFIG_FB_OMAP_LCD_MIPID) += lcd_mipid.o |
36 | objs-y$(CONFIG_MACH_OVERO) += lcd_overo.o | ||
37 | objs-y$(CONFIG_MACH_HERALD) += lcd_htcherald.o | 29 | objs-y$(CONFIG_MACH_HERALD) += lcd_htcherald.o |
38 | 30 | ||
39 | omapfb-objs := $(objs-yy) | 31 | omapfb-objs := $(objs-yy) |
diff --git a/drivers/video/omap/lcd_2430sdp.c b/drivers/video/omap/lcd_2430sdp.c deleted file mode 100644 index e3eccc9af78e..000000000000 --- a/drivers/video/omap/lcd_2430sdp.c +++ /dev/null | |||
@@ -1,203 +0,0 @@ | |||
1 | /* | ||
2 | * LCD panel support for the TI 2430SDP board | ||
3 | * | ||
4 | * Copyright (C) 2007 MontaVista | ||
5 | * Author: Hunyue Yau <hyau@mvista.com> | ||
6 | * | ||
7 | * Derived from drivers/video/omap/lcd-apollon.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 | #include <linux/module.h> | ||
25 | #include <linux/platform_device.h> | ||
26 | #include <linux/delay.h> | ||
27 | #include <linux/gpio.h> | ||
28 | #include <linux/i2c/twl.h> | ||
29 | |||
30 | #include <plat/mux.h> | ||
31 | #include <asm/mach-types.h> | ||
32 | |||
33 | #include "omapfb.h" | ||
34 | |||
35 | #define SDP2430_LCD_PANEL_BACKLIGHT_GPIO 91 | ||
36 | #define SDP2430_LCD_PANEL_ENABLE_GPIO 154 | ||
37 | #define SDP3430_LCD_PANEL_BACKLIGHT_GPIO 24 | ||
38 | #define SDP3430_LCD_PANEL_ENABLE_GPIO 28 | ||
39 | |||
40 | static unsigned backlight_gpio; | ||
41 | static unsigned enable_gpio; | ||
42 | |||
43 | #define LCD_PIXCLOCK_MAX 5400 /* freq 5.4 MHz */ | ||
44 | #define PM_RECEIVER TWL4030_MODULE_PM_RECEIVER | ||
45 | #define ENABLE_VAUX2_DEDICATED 0x09 | ||
46 | #define ENABLE_VAUX2_DEV_GRP 0x20 | ||
47 | #define ENABLE_VAUX3_DEDICATED 0x03 | ||
48 | #define ENABLE_VAUX3_DEV_GRP 0x20 | ||
49 | |||
50 | #define ENABLE_VPLL2_DEDICATED 0x05 | ||
51 | #define ENABLE_VPLL2_DEV_GRP 0xE0 | ||
52 | #define TWL4030_VPLL2_DEV_GRP 0x33 | ||
53 | #define TWL4030_VPLL2_DEDICATED 0x36 | ||
54 | |||
55 | #define t2_out(c, r, v) twl_i2c_write_u8(c, r, v) | ||
56 | |||
57 | |||
58 | static int sdp2430_panel_init(struct lcd_panel *panel, | ||
59 | struct omapfb_device *fbdev) | ||
60 | { | ||
61 | if (machine_is_omap_3430sdp()) { | ||
62 | enable_gpio = SDP3430_LCD_PANEL_ENABLE_GPIO; | ||
63 | backlight_gpio = SDP3430_LCD_PANEL_BACKLIGHT_GPIO; | ||
64 | } else { | ||
65 | enable_gpio = SDP2430_LCD_PANEL_ENABLE_GPIO; | ||
66 | backlight_gpio = SDP2430_LCD_PANEL_BACKLIGHT_GPIO; | ||
67 | } | ||
68 | |||
69 | gpio_request(enable_gpio, "LCD enable"); /* LCD panel */ | ||
70 | gpio_request(backlight_gpio, "LCD bl"); /* LCD backlight */ | ||
71 | gpio_direction_output(enable_gpio, 0); | ||
72 | gpio_direction_output(backlight_gpio, 0); | ||
73 | |||
74 | return 0; | ||
75 | } | ||
76 | |||
77 | static void sdp2430_panel_cleanup(struct lcd_panel *panel) | ||
78 | { | ||
79 | gpio_free(backlight_gpio); | ||
80 | gpio_free(enable_gpio); | ||
81 | } | ||
82 | |||
83 | static int sdp2430_panel_enable(struct lcd_panel *panel) | ||
84 | { | ||
85 | u8 ded_val, ded_reg; | ||
86 | u8 grp_val, grp_reg; | ||
87 | |||
88 | if (machine_is_omap_3430sdp()) { | ||
89 | ded_reg = TWL4030_VAUX3_DEDICATED; | ||
90 | ded_val = ENABLE_VAUX3_DEDICATED; | ||
91 | grp_reg = TWL4030_VAUX3_DEV_GRP; | ||
92 | grp_val = ENABLE_VAUX3_DEV_GRP; | ||
93 | |||
94 | if (omap_rev() > OMAP3430_REV_ES1_0) { | ||
95 | t2_out(PM_RECEIVER, ENABLE_VPLL2_DEDICATED, | ||
96 | TWL4030_VPLL2_DEDICATED); | ||
97 | t2_out(PM_RECEIVER, ENABLE_VPLL2_DEV_GRP, | ||
98 | TWL4030_VPLL2_DEV_GRP); | ||
99 | } | ||
100 | } else { | ||
101 | ded_reg = TWL4030_VAUX2_DEDICATED; | ||
102 | ded_val = ENABLE_VAUX2_DEDICATED; | ||
103 | grp_reg = TWL4030_VAUX2_DEV_GRP; | ||
104 | grp_val = ENABLE_VAUX2_DEV_GRP; | ||
105 | } | ||
106 | |||
107 | gpio_set_value(enable_gpio, 1); | ||
108 | gpio_set_value(backlight_gpio, 1); | ||
109 | |||
110 | if (0 != t2_out(PM_RECEIVER, ded_val, ded_reg)) | ||
111 | return -EIO; | ||
112 | if (0 != t2_out(PM_RECEIVER, grp_val, grp_reg)) | ||
113 | return -EIO; | ||
114 | |||
115 | return 0; | ||
116 | } | ||
117 | |||
118 | static void sdp2430_panel_disable(struct lcd_panel *panel) | ||
119 | { | ||
120 | gpio_set_value(enable_gpio, 0); | ||
121 | gpio_set_value(backlight_gpio, 0); | ||
122 | if (omap_rev() > OMAP3430_REV_ES1_0) { | ||
123 | t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEDICATED); | ||
124 | t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEV_GRP); | ||
125 | msleep(4); | ||
126 | } | ||
127 | } | ||
128 | |||
129 | static unsigned long sdp2430_panel_get_caps(struct lcd_panel *panel) | ||
130 | { | ||
131 | return 0; | ||
132 | } | ||
133 | |||
134 | struct lcd_panel sdp2430_panel = { | ||
135 | .name = "sdp2430", | ||
136 | .config = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC | | ||
137 | OMAP_LCDC_INV_HSYNC, | ||
138 | |||
139 | .bpp = 16, | ||
140 | .data_lines = 16, | ||
141 | .x_res = 240, | ||
142 | .y_res = 320, | ||
143 | .hsw = 3, /* hsync_len (4) - 1 */ | ||
144 | .hfp = 3, /* right_margin (4) - 1 */ | ||
145 | .hbp = 39, /* left_margin (40) - 1 */ | ||
146 | .vsw = 1, /* vsync_len (2) - 1 */ | ||
147 | .vfp = 2, /* lower_margin */ | ||
148 | .vbp = 7, /* upper_margin (8) - 1 */ | ||
149 | |||
150 | .pixel_clock = LCD_PIXCLOCK_MAX, | ||
151 | |||
152 | .init = sdp2430_panel_init, | ||
153 | .cleanup = sdp2430_panel_cleanup, | ||
154 | .enable = sdp2430_panel_enable, | ||
155 | .disable = sdp2430_panel_disable, | ||
156 | .get_caps = sdp2430_panel_get_caps, | ||
157 | }; | ||
158 | |||
159 | static int sdp2430_panel_probe(struct platform_device *pdev) | ||
160 | { | ||
161 | omapfb_register_panel(&sdp2430_panel); | ||
162 | return 0; | ||
163 | } | ||
164 | |||
165 | static int sdp2430_panel_remove(struct platform_device *pdev) | ||
166 | { | ||
167 | return 0; | ||
168 | } | ||
169 | |||
170 | static int sdp2430_panel_suspend(struct platform_device *pdev, | ||
171 | pm_message_t mesg) | ||
172 | { | ||
173 | return 0; | ||
174 | } | ||
175 | |||
176 | static int sdp2430_panel_resume(struct platform_device *pdev) | ||
177 | { | ||
178 | return 0; | ||
179 | } | ||
180 | |||
181 | struct platform_driver sdp2430_panel_driver = { | ||
182 | .probe = sdp2430_panel_probe, | ||
183 | .remove = sdp2430_panel_remove, | ||
184 | .suspend = sdp2430_panel_suspend, | ||
185 | .resume = sdp2430_panel_resume, | ||
186 | .driver = { | ||
187 | .name = "sdp2430_lcd", | ||
188 | .owner = THIS_MODULE, | ||
189 | }, | ||
190 | }; | ||
191 | |||
192 | static int __init sdp2430_panel_drv_init(void) | ||
193 | { | ||
194 | return platform_driver_register(&sdp2430_panel_driver); | ||
195 | } | ||
196 | |||
197 | static void __exit sdp2430_panel_drv_exit(void) | ||
198 | { | ||
199 | platform_driver_unregister(&sdp2430_panel_driver); | ||
200 | } | ||
201 | |||
202 | module_init(sdp2430_panel_drv_init); | ||
203 | module_exit(sdp2430_panel_drv_exit); | ||
diff --git a/drivers/video/omap/lcd_apollon.c b/drivers/video/omap/lcd_apollon.c deleted file mode 100644 index 4b24f549f9b9..000000000000 --- a/drivers/video/omap/lcd_apollon.c +++ /dev/null | |||
@@ -1,136 +0,0 @@ | |||
1 | /* | ||
2 | * LCD panel support for the Samsung OMAP2 Apollon board | ||
3 | * | ||
4 | * Copyright (C) 2005,2006 Samsung Electronics | ||
5 | * Author: Kyungmin Park <kyungmin.park@samsung.com> | ||
6 | * | ||
7 | * Derived from drivers/video/omap/lcd-h4.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 | #include <linux/module.h> | ||
25 | #include <linux/platform_device.h> | ||
26 | |||
27 | #include <asm/gpio.h> | ||
28 | |||
29 | #include "omapfb.h" | ||
30 | |||
31 | /* #define USE_35INCH_LCD 1 */ | ||
32 | |||
33 | static int apollon_panel_init(struct lcd_panel *panel, | ||
34 | struct omapfb_device *fbdev) | ||
35 | { | ||
36 | return 0; | ||
37 | } | ||
38 | |||
39 | static void apollon_panel_cleanup(struct lcd_panel *panel) | ||
40 | { | ||
41 | } | ||
42 | |||
43 | static int apollon_panel_enable(struct lcd_panel *panel) | ||
44 | { | ||
45 | return 0; | ||
46 | } | ||
47 | |||
48 | static void apollon_panel_disable(struct lcd_panel *panel) | ||
49 | { | ||
50 | } | ||
51 | |||
52 | static unsigned long apollon_panel_get_caps(struct lcd_panel *panel) | ||
53 | { | ||
54 | return 0; | ||
55 | } | ||
56 | |||
57 | struct lcd_panel apollon_panel = { | ||
58 | .name = "apollon", | ||
59 | .config = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC | | ||
60 | OMAP_LCDC_INV_HSYNC, | ||
61 | |||
62 | .bpp = 16, | ||
63 | .data_lines = 18, | ||
64 | #ifdef USE_35INCH_LCD | ||
65 | .x_res = 240, | ||
66 | .y_res = 320, | ||
67 | .hsw = 2, | ||
68 | .hfp = 3, | ||
69 | .hbp = 9, | ||
70 | .vsw = 4, | ||
71 | .vfp = 3, | ||
72 | .vbp = 5, | ||
73 | #else | ||
74 | .x_res = 480, | ||
75 | .y_res = 272, | ||
76 | .hsw = 41, | ||
77 | .hfp = 2, | ||
78 | .hbp = 2, | ||
79 | .vsw = 10, | ||
80 | .vfp = 2, | ||
81 | .vbp = 2, | ||
82 | #endif | ||
83 | .pixel_clock = 6250, | ||
84 | |||
85 | .init = apollon_panel_init, | ||
86 | .cleanup = apollon_panel_cleanup, | ||
87 | .enable = apollon_panel_enable, | ||
88 | .disable = apollon_panel_disable, | ||
89 | .get_caps = apollon_panel_get_caps, | ||
90 | }; | ||
91 | |||
92 | static int apollon_panel_probe(struct platform_device *pdev) | ||
93 | { | ||
94 | omapfb_register_panel(&apollon_panel); | ||
95 | return 0; | ||
96 | } | ||
97 | |||
98 | static int apollon_panel_remove(struct platform_device *pdev) | ||
99 | { | ||
100 | return 0; | ||
101 | } | ||
102 | |||
103 | static int apollon_panel_suspend(struct platform_device *pdev, | ||
104 | pm_message_t mesg) | ||
105 | { | ||
106 | return 0; | ||
107 | } | ||
108 | |||
109 | static int apollon_panel_resume(struct platform_device *pdev) | ||
110 | { | ||
111 | return 0; | ||
112 | } | ||
113 | |||
114 | struct platform_driver apollon_panel_driver = { | ||
115 | .probe = apollon_panel_probe, | ||
116 | .remove = apollon_panel_remove, | ||
117 | .suspend = apollon_panel_suspend, | ||
118 | .resume = apollon_panel_resume, | ||
119 | .driver = { | ||
120 | .name = "apollon_lcd", | ||
121 | .owner = THIS_MODULE, | ||
122 | }, | ||
123 | }; | ||
124 | |||
125 | static int __init apollon_panel_drv_init(void) | ||
126 | { | ||
127 | return platform_driver_register(&apollon_panel_driver); | ||
128 | } | ||
129 | |||
130 | static void __exit apollon_panel_drv_exit(void) | ||
131 | { | ||
132 | platform_driver_unregister(&apollon_panel_driver); | ||
133 | } | ||
134 | |||
135 | module_init(apollon_panel_drv_init); | ||
136 | module_exit(apollon_panel_drv_exit); | ||
diff --git a/drivers/video/omap/lcd_h4.c b/drivers/video/omap/lcd_h4.c deleted file mode 100644 index 03a06a982750..000000000000 --- a/drivers/video/omap/lcd_h4.c +++ /dev/null | |||
@@ -1,117 +0,0 @@ | |||
1 | /* | ||
2 | * LCD panel support for the TI OMAP H4 board | ||
3 | * | ||
4 | * Copyright (C) 2004 Nokia Corporation | ||
5 | * Author: Imre Deak <imre.deak@nokia.com> | ||
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 | #include <linux/module.h> | ||
23 | #include <linux/platform_device.h> | ||
24 | |||
25 | #include "omapfb.h" | ||
26 | |||
27 | static int h4_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev) | ||
28 | { | ||
29 | return 0; | ||
30 | } | ||
31 | |||
32 | static void h4_panel_cleanup(struct lcd_panel *panel) | ||
33 | { | ||
34 | } | ||
35 | |||
36 | static int h4_panel_enable(struct lcd_panel *panel) | ||
37 | { | ||
38 | return 0; | ||
39 | } | ||
40 | |||
41 | static void h4_panel_disable(struct lcd_panel *panel) | ||
42 | { | ||
43 | } | ||
44 | |||
45 | static unsigned long h4_panel_get_caps(struct lcd_panel *panel) | ||
46 | { | ||
47 | return 0; | ||
48 | } | ||
49 | |||
50 | static struct lcd_panel h4_panel = { | ||
51 | .name = "h4", | ||
52 | .config = OMAP_LCDC_PANEL_TFT, | ||
53 | |||
54 | .bpp = 16, | ||
55 | .data_lines = 16, | ||
56 | .x_res = 240, | ||
57 | .y_res = 320, | ||
58 | .pixel_clock = 6250, | ||
59 | .hsw = 15, | ||
60 | .hfp = 15, | ||
61 | .hbp = 60, | ||
62 | .vsw = 1, | ||
63 | .vfp = 1, | ||
64 | .vbp = 1, | ||
65 | |||
66 | .init = h4_panel_init, | ||
67 | .cleanup = h4_panel_cleanup, | ||
68 | .enable = h4_panel_enable, | ||
69 | .disable = h4_panel_disable, | ||
70 | .get_caps = h4_panel_get_caps, | ||
71 | }; | ||
72 | |||
73 | static int h4_panel_probe(struct platform_device *pdev) | ||
74 | { | ||
75 | omapfb_register_panel(&h4_panel); | ||
76 | return 0; | ||
77 | } | ||
78 | |||
79 | static int h4_panel_remove(struct platform_device *pdev) | ||
80 | { | ||
81 | return 0; | ||
82 | } | ||
83 | |||
84 | static int h4_panel_suspend(struct platform_device *pdev, pm_message_t mesg) | ||
85 | { | ||
86 | return 0; | ||
87 | } | ||
88 | |||
89 | static int h4_panel_resume(struct platform_device *pdev) | ||
90 | { | ||
91 | return 0; | ||
92 | } | ||
93 | |||
94 | static struct platform_driver h4_panel_driver = { | ||
95 | .probe = h4_panel_probe, | ||
96 | .remove = h4_panel_remove, | ||
97 | .suspend = h4_panel_suspend, | ||
98 | .resume = h4_panel_resume, | ||
99 | .driver = { | ||
100 | .name = "lcd_h4", | ||
101 | .owner = THIS_MODULE, | ||
102 | }, | ||
103 | }; | ||
104 | |||
105 | static int __init h4_panel_drv_init(void) | ||
106 | { | ||
107 | return platform_driver_register(&h4_panel_driver); | ||
108 | } | ||
109 | |||
110 | static void __exit h4_panel_drv_cleanup(void) | ||
111 | { | ||
112 | platform_driver_unregister(&h4_panel_driver); | ||
113 | } | ||
114 | |||
115 | module_init(h4_panel_drv_init); | ||
116 | module_exit(h4_panel_drv_cleanup); | ||
117 | |||
diff --git a/drivers/video/omap/lcd_ldp.c b/drivers/video/omap/lcd_ldp.c deleted file mode 100644 index 062466402c0e..000000000000 --- a/drivers/video/omap/lcd_ldp.c +++ /dev/null | |||
@@ -1,201 +0,0 @@ | |||
1 | /* | ||
2 | * LCD panel support for the TI LDP board | ||
3 | * | ||
4 | * Copyright (C) 2007 WindRiver | ||
5 | * Author: Stanley Miao <stanley.miao@windriver.com> | ||
6 | * | ||
7 | * Derived from drivers/video/omap/lcd-2430sdp.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 | #include <linux/module.h> | ||
25 | #include <linux/platform_device.h> | ||
26 | #include <linux/delay.h> | ||
27 | #include <linux/i2c/twl.h> | ||
28 | |||
29 | #include <asm/gpio.h> | ||
30 | #include <plat/mux.h> | ||
31 | #include <asm/mach-types.h> | ||
32 | |||
33 | #include "omapfb.h" | ||
34 | |||
35 | #define LCD_PANEL_BACKLIGHT_GPIO (15 + OMAP_MAX_GPIO_LINES) | ||
36 | #define LCD_PANEL_ENABLE_GPIO (7 + OMAP_MAX_GPIO_LINES) | ||
37 | |||
38 | #define LCD_PANEL_RESET_GPIO 55 | ||
39 | #define LCD_PANEL_QVGA_GPIO 56 | ||
40 | |||
41 | #ifdef CONFIG_FB_OMAP_LCD_VGA | ||
42 | #define LCD_XRES 480 | ||
43 | #define LCD_YRES 640 | ||
44 | #define LCD_PIXCLOCK_MAX 41700 | ||
45 | #else | ||
46 | #define LCD_XRES 240 | ||
47 | #define LCD_YRES 320 | ||
48 | #define LCD_PIXCLOCK_MAX 185186 | ||
49 | #endif | ||
50 | |||
51 | #define PM_RECEIVER TWL4030_MODULE_PM_RECEIVER | ||
52 | #define ENABLE_VAUX2_DEDICATED 0x09 | ||
53 | #define ENABLE_VAUX2_DEV_GRP 0x20 | ||
54 | #define ENABLE_VAUX3_DEDICATED 0x03 | ||
55 | #define ENABLE_VAUX3_DEV_GRP 0x20 | ||
56 | |||
57 | #define ENABLE_VPLL2_DEDICATED 0x05 | ||
58 | #define ENABLE_VPLL2_DEV_GRP 0xE0 | ||
59 | #define TWL4030_VPLL2_DEV_GRP 0x33 | ||
60 | #define TWL4030_VPLL2_DEDICATED 0x36 | ||
61 | |||
62 | #define t2_out(c, r, v) twl_i2c_write_u8(c, r, v) | ||
63 | |||
64 | |||
65 | static int ldp_panel_init(struct lcd_panel *panel, | ||
66 | struct omapfb_device *fbdev) | ||
67 | { | ||
68 | gpio_request(LCD_PANEL_RESET_GPIO, "lcd reset"); | ||
69 | gpio_request(LCD_PANEL_QVGA_GPIO, "lcd qvga"); | ||
70 | gpio_request(LCD_PANEL_ENABLE_GPIO, "lcd panel"); | ||
71 | gpio_request(LCD_PANEL_BACKLIGHT_GPIO, "lcd backlight"); | ||
72 | |||
73 | gpio_direction_output(LCD_PANEL_QVGA_GPIO, 0); | ||
74 | gpio_direction_output(LCD_PANEL_RESET_GPIO, 0); | ||
75 | gpio_direction_output(LCD_PANEL_ENABLE_GPIO, 0); | ||
76 | gpio_direction_output(LCD_PANEL_BACKLIGHT_GPIO, 0); | ||
77 | |||
78 | #ifdef CONFIG_FB_OMAP_LCD_VGA | ||
79 | gpio_set_value(LCD_PANEL_QVGA_GPIO, 0); | ||
80 | #else | ||
81 | gpio_set_value(LCD_PANEL_QVGA_GPIO, 1); | ||
82 | #endif | ||
83 | gpio_set_value(LCD_PANEL_RESET_GPIO, 1); | ||
84 | |||
85 | return 0; | ||
86 | } | ||
87 | |||
88 | static void ldp_panel_cleanup(struct lcd_panel *panel) | ||
89 | { | ||
90 | gpio_free(LCD_PANEL_BACKLIGHT_GPIO); | ||
91 | gpio_free(LCD_PANEL_ENABLE_GPIO); | ||
92 | gpio_free(LCD_PANEL_QVGA_GPIO); | ||
93 | gpio_free(LCD_PANEL_RESET_GPIO); | ||
94 | } | ||
95 | |||
96 | static int ldp_panel_enable(struct lcd_panel *panel) | ||
97 | { | ||
98 | if (0 != t2_out(PM_RECEIVER, ENABLE_VPLL2_DEDICATED, | ||
99 | TWL4030_VPLL2_DEDICATED)) | ||
100 | return -EIO; | ||
101 | if (0 != t2_out(PM_RECEIVER, ENABLE_VPLL2_DEV_GRP, | ||
102 | TWL4030_VPLL2_DEV_GRP)) | ||
103 | return -EIO; | ||
104 | |||
105 | gpio_direction_output(LCD_PANEL_ENABLE_GPIO, 1); | ||
106 | gpio_direction_output(LCD_PANEL_BACKLIGHT_GPIO, 1); | ||
107 | |||
108 | if (0 != t2_out(PM_RECEIVER, ENABLE_VAUX3_DEDICATED, | ||
109 | TWL4030_VAUX3_DEDICATED)) | ||
110 | return -EIO; | ||
111 | if (0 != t2_out(PM_RECEIVER, ENABLE_VAUX3_DEV_GRP, | ||
112 | TWL4030_VAUX3_DEV_GRP)) | ||
113 | return -EIO; | ||
114 | |||
115 | return 0; | ||
116 | } | ||
117 | |||
118 | static void ldp_panel_disable(struct lcd_panel *panel) | ||
119 | { | ||
120 | gpio_direction_output(LCD_PANEL_ENABLE_GPIO, 0); | ||
121 | gpio_direction_output(LCD_PANEL_BACKLIGHT_GPIO, 0); | ||
122 | |||
123 | t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEDICATED); | ||
124 | t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEV_GRP); | ||
125 | msleep(4); | ||
126 | } | ||
127 | |||
128 | static unsigned long ldp_panel_get_caps(struct lcd_panel *panel) | ||
129 | { | ||
130 | return 0; | ||
131 | } | ||
132 | |||
133 | struct lcd_panel ldp_panel = { | ||
134 | .name = "ldp", | ||
135 | .config = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC | | ||
136 | OMAP_LCDC_INV_HSYNC, | ||
137 | |||
138 | .bpp = 16, | ||
139 | .data_lines = 18, | ||
140 | .x_res = LCD_XRES, | ||
141 | .y_res = LCD_YRES, | ||
142 | .hsw = 3, /* hsync_len (4) - 1 */ | ||
143 | .hfp = 3, /* right_margin (4) - 1 */ | ||
144 | .hbp = 39, /* left_margin (40) - 1 */ | ||
145 | .vsw = 1, /* vsync_len (2) - 1 */ | ||
146 | .vfp = 2, /* lower_margin */ | ||
147 | .vbp = 7, /* upper_margin (8) - 1 */ | ||
148 | |||
149 | .pixel_clock = LCD_PIXCLOCK_MAX, | ||
150 | |||
151 | .init = ldp_panel_init, | ||
152 | .cleanup = ldp_panel_cleanup, | ||
153 | .enable = ldp_panel_enable, | ||
154 | .disable = ldp_panel_disable, | ||
155 | .get_caps = ldp_panel_get_caps, | ||
156 | }; | ||
157 | |||
158 | static int ldp_panel_probe(struct platform_device *pdev) | ||
159 | { | ||
160 | omapfb_register_panel(&ldp_panel); | ||
161 | return 0; | ||
162 | } | ||
163 | |||
164 | static int ldp_panel_remove(struct platform_device *pdev) | ||
165 | { | ||
166 | return 0; | ||
167 | } | ||
168 | |||
169 | static int ldp_panel_suspend(struct platform_device *pdev, pm_message_t mesg) | ||
170 | { | ||
171 | return 0; | ||
172 | } | ||
173 | |||
174 | static int ldp_panel_resume(struct platform_device *pdev) | ||
175 | { | ||
176 | return 0; | ||
177 | } | ||
178 | |||
179 | struct platform_driver ldp_panel_driver = { | ||
180 | .probe = ldp_panel_probe, | ||
181 | .remove = ldp_panel_remove, | ||
182 | .suspend = ldp_panel_suspend, | ||
183 | .resume = ldp_panel_resume, | ||
184 | .driver = { | ||
185 | .name = "ldp_lcd", | ||
186 | .owner = THIS_MODULE, | ||
187 | }, | ||
188 | }; | ||
189 | |||
190 | static int __init ldp_panel_drv_init(void) | ||
191 | { | ||
192 | return platform_driver_register(&ldp_panel_driver); | ||
193 | } | ||
194 | |||
195 | static void __exit ldp_panel_drv_exit(void) | ||
196 | { | ||
197 | platform_driver_unregister(&ldp_panel_driver); | ||
198 | } | ||
199 | |||
200 | module_init(ldp_panel_drv_init); | ||
201 | module_exit(ldp_panel_drv_exit); | ||
diff --git a/drivers/video/omap/lcd_omap3beagle.c b/drivers/video/omap/lcd_omap3beagle.c deleted file mode 100644 index d7c6c3e0afc6..000000000000 --- a/drivers/video/omap/lcd_omap3beagle.c +++ /dev/null | |||
@@ -1,130 +0,0 @@ | |||
1 | /* | ||
2 | * LCD panel support for the TI OMAP3 Beagle board | ||
3 | * | ||
4 | * Author: Koen Kooi <koen@openembedded.org> | ||
5 | * | ||
6 | * Derived from drivers/video/omap/lcd-omap3evm.c | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License as published by the | ||
10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
11 | * option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, but | ||
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License along | ||
19 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
20 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
21 | */ | ||
22 | |||
23 | #include <linux/module.h> | ||
24 | #include <linux/platform_device.h> | ||
25 | #include <linux/gpio.h> | ||
26 | #include <linux/i2c/twl.h> | ||
27 | |||
28 | #include <asm/mach-types.h> | ||
29 | |||
30 | #include "omapfb.h" | ||
31 | |||
32 | #define LCD_PANEL_ENABLE_GPIO 170 | ||
33 | |||
34 | static int omap3beagle_panel_init(struct lcd_panel *panel, | ||
35 | struct omapfb_device *fbdev) | ||
36 | { | ||
37 | gpio_request(LCD_PANEL_ENABLE_GPIO, "LCD enable"); | ||
38 | return 0; | ||
39 | } | ||
40 | |||
41 | static void omap3beagle_panel_cleanup(struct lcd_panel *panel) | ||
42 | { | ||
43 | gpio_free(LCD_PANEL_ENABLE_GPIO); | ||
44 | } | ||
45 | |||
46 | static int omap3beagle_panel_enable(struct lcd_panel *panel) | ||
47 | { | ||
48 | gpio_set_value(LCD_PANEL_ENABLE_GPIO, 1); | ||
49 | return 0; | ||
50 | } | ||
51 | |||
52 | static void omap3beagle_panel_disable(struct lcd_panel *panel) | ||
53 | { | ||
54 | gpio_set_value(LCD_PANEL_ENABLE_GPIO, 0); | ||
55 | } | ||
56 | |||
57 | static unsigned long omap3beagle_panel_get_caps(struct lcd_panel *panel) | ||
58 | { | ||
59 | return 0; | ||
60 | } | ||
61 | |||
62 | struct lcd_panel omap3beagle_panel = { | ||
63 | .name = "omap3beagle", | ||
64 | .config = OMAP_LCDC_PANEL_TFT, | ||
65 | |||
66 | .bpp = 16, | ||
67 | .data_lines = 24, | ||
68 | .x_res = 1024, | ||
69 | .y_res = 768, | ||
70 | .hsw = 3, /* hsync_len (4) - 1 */ | ||
71 | .hfp = 3, /* right_margin (4) - 1 */ | ||
72 | .hbp = 39, /* left_margin (40) - 1 */ | ||
73 | .vsw = 1, /* vsync_len (2) - 1 */ | ||
74 | .vfp = 2, /* lower_margin */ | ||
75 | .vbp = 7, /* upper_margin (8) - 1 */ | ||
76 | |||
77 | .pixel_clock = 64000, | ||
78 | |||
79 | .init = omap3beagle_panel_init, | ||
80 | .cleanup = omap3beagle_panel_cleanup, | ||
81 | .enable = omap3beagle_panel_enable, | ||
82 | .disable = omap3beagle_panel_disable, | ||
83 | .get_caps = omap3beagle_panel_get_caps, | ||
84 | }; | ||
85 | |||
86 | static int omap3beagle_panel_probe(struct platform_device *pdev) | ||
87 | { | ||
88 | omapfb_register_panel(&omap3beagle_panel); | ||
89 | return 0; | ||
90 | } | ||
91 | |||
92 | static int omap3beagle_panel_remove(struct platform_device *pdev) | ||
93 | { | ||
94 | return 0; | ||
95 | } | ||
96 | |||
97 | static int omap3beagle_panel_suspend(struct platform_device *pdev, | ||
98 | pm_message_t mesg) | ||
99 | { | ||
100 | return 0; | ||
101 | } | ||
102 | |||
103 | static int omap3beagle_panel_resume(struct platform_device *pdev) | ||
104 | { | ||
105 | return 0; | ||
106 | } | ||
107 | |||
108 | struct platform_driver omap3beagle_panel_driver = { | ||
109 | .probe = omap3beagle_panel_probe, | ||
110 | .remove = omap3beagle_panel_remove, | ||
111 | .suspend = omap3beagle_panel_suspend, | ||
112 | .resume = omap3beagle_panel_resume, | ||
113 | .driver = { | ||
114 | .name = "omap3beagle_lcd", | ||
115 | .owner = THIS_MODULE, | ||
116 | }, | ||
117 | }; | ||
118 | |||
119 | static int __init omap3beagle_panel_drv_init(void) | ||
120 | { | ||
121 | return platform_driver_register(&omap3beagle_panel_driver); | ||
122 | } | ||
123 | |||
124 | static void __exit omap3beagle_panel_drv_exit(void) | ||
125 | { | ||
126 | platform_driver_unregister(&omap3beagle_panel_driver); | ||
127 | } | ||
128 | |||
129 | module_init(omap3beagle_panel_drv_init); | ||
130 | module_exit(omap3beagle_panel_drv_exit); | ||
diff --git a/drivers/video/omap/lcd_omap3evm.c b/drivers/video/omap/lcd_omap3evm.c deleted file mode 100644 index 06840da0b094..000000000000 --- a/drivers/video/omap/lcd_omap3evm.c +++ /dev/null | |||
@@ -1,193 +0,0 @@ | |||
1 | /* | ||
2 | * LCD panel support for the TI OMAP3 EVM board | ||
3 | * | ||
4 | * Author: Steve Sakoman <steve@sakoman.com> | ||
5 | * | ||
6 | * Derived from drivers/video/omap/lcd-apollon.c | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License as published by the | ||
10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
11 | * option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, but | ||
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License along | ||
19 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
20 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
21 | */ | ||
22 | |||
23 | #include <linux/module.h> | ||
24 | #include <linux/platform_device.h> | ||
25 | #include <linux/gpio.h> | ||
26 | #include <linux/i2c/twl.h> | ||
27 | |||
28 | #include <plat/mux.h> | ||
29 | #include <asm/mach-types.h> | ||
30 | |||
31 | #include "omapfb.h" | ||
32 | |||
33 | #define LCD_PANEL_ENABLE_GPIO 153 | ||
34 | #define LCD_PANEL_LR 2 | ||
35 | #define LCD_PANEL_UD 3 | ||
36 | #define LCD_PANEL_INI 152 | ||
37 | #define LCD_PANEL_QVGA 154 | ||
38 | #define LCD_PANEL_RESB 155 | ||
39 | |||
40 | #define ENABLE_VDAC_DEDICATED 0x03 | ||
41 | #define ENABLE_VDAC_DEV_GRP 0x20 | ||
42 | #define ENABLE_VPLL2_DEDICATED 0x05 | ||
43 | #define ENABLE_VPLL2_DEV_GRP 0xE0 | ||
44 | |||
45 | #define TWL_LED_LEDEN 0x00 | ||
46 | #define TWL_PWMA_PWMAON 0x00 | ||
47 | #define TWL_PWMA_PWMAOFF 0x01 | ||
48 | |||
49 | static unsigned int bklight_level; | ||
50 | |||
51 | static int omap3evm_panel_init(struct lcd_panel *panel, | ||
52 | struct omapfb_device *fbdev) | ||
53 | { | ||
54 | gpio_request(LCD_PANEL_LR, "LCD lr"); | ||
55 | gpio_request(LCD_PANEL_UD, "LCD ud"); | ||
56 | gpio_request(LCD_PANEL_INI, "LCD ini"); | ||
57 | gpio_request(LCD_PANEL_RESB, "LCD resb"); | ||
58 | gpio_request(LCD_PANEL_QVGA, "LCD qvga"); | ||
59 | |||
60 | gpio_direction_output(LCD_PANEL_RESB, 1); | ||
61 | gpio_direction_output(LCD_PANEL_INI, 1); | ||
62 | gpio_direction_output(LCD_PANEL_QVGA, 0); | ||
63 | gpio_direction_output(LCD_PANEL_LR, 1); | ||
64 | gpio_direction_output(LCD_PANEL_UD, 1); | ||
65 | |||
66 | twl_i2c_write_u8(TWL4030_MODULE_LED, 0x11, TWL_LED_LEDEN); | ||
67 | twl_i2c_write_u8(TWL4030_MODULE_PWMA, 0x01, TWL_PWMA_PWMAON); | ||
68 | twl_i2c_write_u8(TWL4030_MODULE_PWMA, 0x02, TWL_PWMA_PWMAOFF); | ||
69 | bklight_level = 100; | ||
70 | |||
71 | return 0; | ||
72 | } | ||
73 | |||
74 | static void omap3evm_panel_cleanup(struct lcd_panel *panel) | ||
75 | { | ||
76 | gpio_free(LCD_PANEL_QVGA); | ||
77 | gpio_free(LCD_PANEL_RESB); | ||
78 | gpio_free(LCD_PANEL_INI); | ||
79 | gpio_free(LCD_PANEL_UD); | ||
80 | gpio_free(LCD_PANEL_LR); | ||
81 | } | ||
82 | |||
83 | static int omap3evm_panel_enable(struct lcd_panel *panel) | ||
84 | { | ||
85 | gpio_set_value(LCD_PANEL_ENABLE_GPIO, 0); | ||
86 | return 0; | ||
87 | } | ||
88 | |||
89 | static void omap3evm_panel_disable(struct lcd_panel *panel) | ||
90 | { | ||
91 | gpio_set_value(LCD_PANEL_ENABLE_GPIO, 1); | ||
92 | } | ||
93 | |||
94 | static unsigned long omap3evm_panel_get_caps(struct lcd_panel *panel) | ||
95 | { | ||
96 | return 0; | ||
97 | } | ||
98 | |||
99 | static int omap3evm_bklight_setlevel(struct lcd_panel *panel, | ||
100 | unsigned int level) | ||
101 | { | ||
102 | u8 c; | ||
103 | if ((level >= 0) && (level <= 100)) { | ||
104 | c = (125 * (100 - level)) / 100 + 2; | ||
105 | twl_i2c_write_u8(TWL4030_MODULE_PWMA, c, TWL_PWMA_PWMAOFF); | ||
106 | bklight_level = level; | ||
107 | } | ||
108 | return 0; | ||
109 | } | ||
110 | |||
111 | static unsigned int omap3evm_bklight_getlevel(struct lcd_panel *panel) | ||
112 | { | ||
113 | return bklight_level; | ||
114 | } | ||
115 | |||
116 | static unsigned int omap3evm_bklight_getmaxlevel(struct lcd_panel *panel) | ||
117 | { | ||
118 | return 100; | ||
119 | } | ||
120 | |||
121 | struct lcd_panel omap3evm_panel = { | ||
122 | .name = "omap3evm", | ||
123 | .config = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC | | ||
124 | OMAP_LCDC_INV_HSYNC, | ||
125 | |||
126 | .bpp = 16, | ||
127 | .data_lines = 18, | ||
128 | .x_res = 480, | ||
129 | .y_res = 640, | ||
130 | .hsw = 3, /* hsync_len (4) - 1 */ | ||
131 | .hfp = 3, /* right_margin (4) - 1 */ | ||
132 | .hbp = 39, /* left_margin (40) - 1 */ | ||
133 | .vsw = 1, /* vsync_len (2) - 1 */ | ||
134 | .vfp = 2, /* lower_margin */ | ||
135 | .vbp = 7, /* upper_margin (8) - 1 */ | ||
136 | |||
137 | .pixel_clock = 26000, | ||
138 | |||
139 | .init = omap3evm_panel_init, | ||
140 | .cleanup = omap3evm_panel_cleanup, | ||
141 | .enable = omap3evm_panel_enable, | ||
142 | .disable = omap3evm_panel_disable, | ||
143 | .get_caps = omap3evm_panel_get_caps, | ||
144 | .set_bklight_level = omap3evm_bklight_setlevel, | ||
145 | .get_bklight_level = omap3evm_bklight_getlevel, | ||
146 | .get_bklight_max = omap3evm_bklight_getmaxlevel, | ||
147 | }; | ||
148 | |||
149 | static int omap3evm_panel_probe(struct platform_device *pdev) | ||
150 | { | ||
151 | omapfb_register_panel(&omap3evm_panel); | ||
152 | return 0; | ||
153 | } | ||
154 | |||
155 | static int omap3evm_panel_remove(struct platform_device *pdev) | ||
156 | { | ||
157 | return 0; | ||
158 | } | ||
159 | |||
160 | static int omap3evm_panel_suspend(struct platform_device *pdev, | ||
161 | pm_message_t mesg) | ||
162 | { | ||
163 | return 0; | ||
164 | } | ||
165 | |||
166 | static int omap3evm_panel_resume(struct platform_device *pdev) | ||
167 | { | ||
168 | return 0; | ||
169 | } | ||
170 | |||
171 | struct platform_driver omap3evm_panel_driver = { | ||
172 | .probe = omap3evm_panel_probe, | ||
173 | .remove = omap3evm_panel_remove, | ||
174 | .suspend = omap3evm_panel_suspend, | ||
175 | .resume = omap3evm_panel_resume, | ||
176 | .driver = { | ||
177 | .name = "omap3evm_lcd", | ||
178 | .owner = THIS_MODULE, | ||
179 | }, | ||
180 | }; | ||
181 | |||
182 | static int __init omap3evm_panel_drv_init(void) | ||
183 | { | ||
184 | return platform_driver_register(&omap3evm_panel_driver); | ||
185 | } | ||
186 | |||
187 | static void __exit omap3evm_panel_drv_exit(void) | ||
188 | { | ||
189 | platform_driver_unregister(&omap3evm_panel_driver); | ||
190 | } | ||
191 | |||
192 | module_init(omap3evm_panel_drv_init); | ||
193 | module_exit(omap3evm_panel_drv_exit); | ||
diff --git a/drivers/video/omap/lcd_overo.c b/drivers/video/omap/lcd_overo.c deleted file mode 100644 index b8fd5b2ec29c..000000000000 --- a/drivers/video/omap/lcd_overo.c +++ /dev/null | |||
@@ -1,180 +0,0 @@ | |||
1 | /* | ||
2 | * LCD panel support for the Gumstix Overo | ||
3 | * | ||
4 | * Author: Steve Sakoman <steve@sakoman.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, but | ||
12 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
19 | * | ||
20 | */ | ||
21 | |||
22 | #include <linux/module.h> | ||
23 | #include <linux/platform_device.h> | ||
24 | #include <linux/i2c/twl.h> | ||
25 | |||
26 | #include <asm/gpio.h> | ||
27 | #include <plat/mux.h> | ||
28 | #include <asm/mach-types.h> | ||
29 | |||
30 | #include "omapfb.h" | ||
31 | |||
32 | #define LCD_ENABLE 144 | ||
33 | |||
34 | static int overo_panel_init(struct lcd_panel *panel, | ||
35 | struct omapfb_device *fbdev) | ||
36 | { | ||
37 | if ((gpio_request(LCD_ENABLE, "LCD_ENABLE") == 0) && | ||
38 | (gpio_direction_output(LCD_ENABLE, 1) == 0)) | ||
39 | gpio_export(LCD_ENABLE, 0); | ||
40 | else | ||
41 | printk(KERN_ERR "could not obtain gpio for LCD_ENABLE\n"); | ||
42 | |||
43 | return 0; | ||
44 | } | ||
45 | |||
46 | static void overo_panel_cleanup(struct lcd_panel *panel) | ||
47 | { | ||
48 | gpio_free(LCD_ENABLE); | ||
49 | } | ||
50 | |||
51 | static int overo_panel_enable(struct lcd_panel *panel) | ||
52 | { | ||
53 | gpio_set_value(LCD_ENABLE, 1); | ||
54 | return 0; | ||
55 | } | ||
56 | |||
57 | static void overo_panel_disable(struct lcd_panel *panel) | ||
58 | { | ||
59 | gpio_set_value(LCD_ENABLE, 0); | ||
60 | } | ||
61 | |||
62 | static unsigned long overo_panel_get_caps(struct lcd_panel *panel) | ||
63 | { | ||
64 | return 0; | ||
65 | } | ||
66 | |||
67 | struct lcd_panel overo_panel = { | ||
68 | .name = "overo", | ||
69 | .config = OMAP_LCDC_PANEL_TFT, | ||
70 | .bpp = 16, | ||
71 | .data_lines = 24, | ||
72 | |||
73 | #if defined CONFIG_FB_OMAP_031M3R | ||
74 | |||
75 | /* 640 x 480 @ 60 Hz Reduced blanking VESA CVT 0.31M3-R */ | ||
76 | .x_res = 640, | ||
77 | .y_res = 480, | ||
78 | .hfp = 48, | ||
79 | .hsw = 32, | ||
80 | .hbp = 80, | ||
81 | .vfp = 3, | ||
82 | .vsw = 4, | ||
83 | .vbp = 7, | ||
84 | .pixel_clock = 23500, | ||
85 | |||
86 | #elif defined CONFIG_FB_OMAP_048M3R | ||
87 | |||
88 | /* 800 x 600 @ 60 Hz Reduced blanking VESA CVT 0.48M3-R */ | ||
89 | .x_res = 800, | ||
90 | .y_res = 600, | ||
91 | .hfp = 48, | ||
92 | .hsw = 32, | ||
93 | .hbp = 80, | ||
94 | .vfp = 3, | ||
95 | .vsw = 4, | ||
96 | .vbp = 11, | ||
97 | .pixel_clock = 35500, | ||
98 | |||
99 | #elif defined CONFIG_FB_OMAP_079M3R | ||
100 | |||
101 | /* 1024 x 768 @ 60 Hz Reduced blanking VESA CVT 0.79M3-R */ | ||
102 | .x_res = 1024, | ||
103 | .y_res = 768, | ||
104 | .hfp = 48, | ||
105 | .hsw = 32, | ||
106 | .hbp = 80, | ||
107 | .vfp = 3, | ||
108 | .vsw = 4, | ||
109 | .vbp = 15, | ||
110 | .pixel_clock = 56000, | ||
111 | |||
112 | #elif defined CONFIG_FB_OMAP_092M9R | ||
113 | |||
114 | /* 1280 x 720 @ 60 Hz Reduced blanking VESA CVT 0.92M9-R */ | ||
115 | .x_res = 1280, | ||
116 | .y_res = 720, | ||
117 | .hfp = 48, | ||
118 | .hsw = 32, | ||
119 | .hbp = 80, | ||
120 | .vfp = 3, | ||
121 | .vsw = 5, | ||
122 | .vbp = 13, | ||
123 | .pixel_clock = 64000, | ||
124 | |||
125 | #else | ||
126 | |||
127 | /* use 640 x 480 if no config option */ | ||
128 | /* 640 x 480 @ 60 Hz Reduced blanking VESA CVT 0.31M3-R */ | ||
129 | .x_res = 640, | ||
130 | .y_res = 480, | ||
131 | .hfp = 48, | ||
132 | .hsw = 32, | ||
133 | .hbp = 80, | ||
134 | .vfp = 3, | ||
135 | .vsw = 4, | ||
136 | .vbp = 7, | ||
137 | .pixel_clock = 23500, | ||
138 | |||
139 | #endif | ||
140 | |||
141 | .init = overo_panel_init, | ||
142 | .cleanup = overo_panel_cleanup, | ||
143 | .enable = overo_panel_enable, | ||
144 | .disable = overo_panel_disable, | ||
145 | .get_caps = overo_panel_get_caps, | ||
146 | }; | ||
147 | |||
148 | static int overo_panel_probe(struct platform_device *pdev) | ||
149 | { | ||
150 | omapfb_register_panel(&overo_panel); | ||
151 | return 0; | ||
152 | } | ||
153 | |||
154 | static int overo_panel_remove(struct platform_device *pdev) | ||
155 | { | ||
156 | /* omapfb does not have unregister_panel */ | ||
157 | return 0; | ||
158 | } | ||
159 | |||
160 | static struct platform_driver overo_panel_driver = { | ||
161 | .probe = overo_panel_probe, | ||
162 | .remove = overo_panel_remove, | ||
163 | .driver = { | ||
164 | .name = "overo_lcd", | ||
165 | .owner = THIS_MODULE, | ||
166 | }, | ||
167 | }; | ||
168 | |||
169 | static int __init overo_panel_drv_init(void) | ||
170 | { | ||
171 | return platform_driver_register(&overo_panel_driver); | ||
172 | } | ||
173 | |||
174 | static void __exit overo_panel_drv_exit(void) | ||
175 | { | ||
176 | platform_driver_unregister(&overo_panel_driver); | ||
177 | } | ||
178 | |||
179 | module_init(overo_panel_drv_init); | ||
180 | module_exit(overo_panel_drv_exit); | ||