diff options
author | Cory Maccarrone <darkstar6262@gmail.com> | 2009-11-22 13:11:34 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2009-11-22 13:24:33 -0500 |
commit | 9c2816f7bd445c5eb152babff4d6fb3f8f556610 (patch) | |
tree | ad5e9f3fd72c9471c22bb0f9cff05812db10a5e0 /drivers/video/omap | |
parent | 1ced4532c0fc8cba1776e237b8c7fda6edc19330 (diff) |
omap1: Add board support and LCD for HTC Herald
This patch introduces support for the HTC Herald (T-Mobile
Wing, etc.) series of smart phones -- board support and LCD
panel settings.
Signed-off-by: Cory Maccarrone <darkstar6262@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'drivers/video/omap')
-rw-r--r-- | drivers/video/omap/Makefile | 1 | ||||
-rw-r--r-- | drivers/video/omap/lcd_htcherald.c | 130 |
2 files changed, 131 insertions, 0 deletions
diff --git a/drivers/video/omap/Makefile b/drivers/video/omap/Makefile index b63b198d1f03..49226a1b909e 100644 --- a/drivers/video/omap/Makefile +++ b/drivers/video/omap/Makefile | |||
@@ -35,6 +35,7 @@ objs-y$(CONFIG_MACH_OMAP3EVM) += lcd_omap3evm.o | |||
35 | objs-y$(CONFIG_MACH_OMAP3_BEAGLE) += lcd_omap3beagle.o | 35 | objs-y$(CONFIG_MACH_OMAP3_BEAGLE) += lcd_omap3beagle.o |
36 | objs-y$(CONFIG_FB_OMAP_LCD_MIPID) += lcd_mipid.o | 36 | objs-y$(CONFIG_FB_OMAP_LCD_MIPID) += lcd_mipid.o |
37 | objs-y$(CONFIG_MACH_OVERO) += lcd_overo.o | 37 | objs-y$(CONFIG_MACH_OVERO) += lcd_overo.o |
38 | objs-y$(CONFIG_MACH_HERALD) += lcd_htcherald.o | ||
38 | 39 | ||
39 | omapfb-objs := $(objs-yy) | 40 | omapfb-objs := $(objs-yy) |
40 | 41 | ||
diff --git a/drivers/video/omap/lcd_htcherald.c b/drivers/video/omap/lcd_htcherald.c new file mode 100644 index 000000000000..2e0c81ea7483 --- /dev/null +++ b/drivers/video/omap/lcd_htcherald.c | |||
@@ -0,0 +1,130 @@ | |||
1 | /* | ||
2 | * File: drivers/video/omap/lcd-htcherald.c | ||
3 | * | ||
4 | * LCD panel support for the HTC Herald | ||
5 | * | ||
6 | * Copyright (C) 2009 Cory Maccarrone <darkstar6262@gmail.com> | ||
7 | * Copyright (C) 2009 Wing Linux | ||
8 | * | ||
9 | * Based on the lcd_htcwizard.c file from the linwizard project: | ||
10 | * Copyright (C) linwizard.sourceforge.net | ||
11 | * Author: Angelo Arrifano <miknix@gmail.com> | ||
12 | * Based on lcd_h4 by Imre Deak <imre.deak@nokia.com> | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or modify it | ||
15 | * under the terms of the GNU General Public License as published by the | ||
16 | * Free Software Foundation; either version 2 of the License, or (at your | ||
17 | * option) any later version. | ||
18 | * | ||
19 | * This program is distributed in the hope that it will be useful, but | ||
20 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
22 | * General Public License for more details. | ||
23 | * | ||
24 | * You should have received a copy of the GNU General Public License along | ||
25 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
26 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
27 | */ | ||
28 | |||
29 | #include <linux/module.h> | ||
30 | #include <linux/platform_device.h> | ||
31 | |||
32 | #include <plat/omapfb.h> | ||
33 | |||
34 | static int htcherald_panel_init(struct lcd_panel *panel, | ||
35 | struct omapfb_device *fbdev) | ||
36 | { | ||
37 | return 0; | ||
38 | } | ||
39 | |||
40 | static void htcherald_panel_cleanup(struct lcd_panel *panel) | ||
41 | { | ||
42 | } | ||
43 | |||
44 | static int htcherald_panel_enable(struct lcd_panel *panel) | ||
45 | { | ||
46 | return 0; | ||
47 | } | ||
48 | |||
49 | static void htcherald_panel_disable(struct lcd_panel *panel) | ||
50 | { | ||
51 | } | ||
52 | |||
53 | static unsigned long htcherald_panel_get_caps(struct lcd_panel *panel) | ||
54 | { | ||
55 | return 0; | ||
56 | } | ||
57 | |||
58 | /* Found on WIZ200 (miknix) and some HERA110 models (darkstar62) */ | ||
59 | struct lcd_panel htcherald_panel_1 = { | ||
60 | .name = "lcd_herald", | ||
61 | .config = OMAP_LCDC_PANEL_TFT | | ||
62 | OMAP_LCDC_INV_HSYNC | | ||
63 | OMAP_LCDC_INV_VSYNC | | ||
64 | OMAP_LCDC_INV_PIX_CLOCK, | ||
65 | .bpp = 16, | ||
66 | .data_lines = 16, | ||
67 | .x_res = 240, | ||
68 | .y_res = 320, | ||
69 | .pixel_clock = 6093, | ||
70 | .pcd = 0, /* 15 */ | ||
71 | .hsw = 10, | ||
72 | .hfp = 10, | ||
73 | .hbp = 20, | ||
74 | .vsw = 3, | ||
75 | .vfp = 2, | ||
76 | .vbp = 2, | ||
77 | |||
78 | .init = htcherald_panel_init, | ||
79 | .cleanup = htcherald_panel_cleanup, | ||
80 | .enable = htcherald_panel_enable, | ||
81 | .disable = htcherald_panel_disable, | ||
82 | .get_caps = htcherald_panel_get_caps, | ||
83 | }; | ||
84 | |||
85 | static int htcherald_panel_probe(struct platform_device *pdev) | ||
86 | { | ||
87 | omapfb_register_panel(&htcherald_panel_1); | ||
88 | return 0; | ||
89 | } | ||
90 | |||
91 | static int htcherald_panel_remove(struct platform_device *pdev) | ||
92 | { | ||
93 | return 0; | ||
94 | } | ||
95 | |||
96 | static int htcherald_panel_suspend(struct platform_device *pdev, | ||
97 | pm_message_t mesg) | ||
98 | { | ||
99 | return 0; | ||
100 | } | ||
101 | |||
102 | static int htcherald_panel_resume(struct platform_device *pdev) | ||
103 | { | ||
104 | return 0; | ||
105 | } | ||
106 | |||
107 | struct platform_driver htcherald_panel_driver = { | ||
108 | .probe = htcherald_panel_probe, | ||
109 | .remove = htcherald_panel_remove, | ||
110 | .suspend = htcherald_panel_suspend, | ||
111 | .resume = htcherald_panel_resume, | ||
112 | .driver = { | ||
113 | .name = "lcd_htcherald", | ||
114 | .owner = THIS_MODULE, | ||
115 | }, | ||
116 | }; | ||
117 | |||
118 | static int htcherald_panel_drv_init(void) | ||
119 | { | ||
120 | return platform_driver_register(&htcherald_panel_driver); | ||
121 | } | ||
122 | |||
123 | static void htcherald_panel_drv_cleanup(void) | ||
124 | { | ||
125 | platform_driver_unregister(&htcherald_panel_driver); | ||
126 | } | ||
127 | |||
128 | module_init(htcherald_panel_drv_init); | ||
129 | module_exit(htcherald_panel_drv_cleanup); | ||
130 | |||