diff options
author | Mike Rapoport <mike@compulab.co.il> | 2009-12-14 03:01:07 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@nokia.com> | 2010-02-12 05:46:05 -0500 |
commit | 751ef159c5600e7ee53e64c3d04f3e2d78908ce5 (patch) | |
tree | 0b18f62c80cdd4a4cf39561e23dea43d6d9b70ad | |
parent | 1c64606968538396ffe87eb6da4121a5bffe5e34 (diff) |
OMAP: DSS2: add Toppoly TDO35S panel
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
-rw-r--r-- | drivers/video/omap2/displays/Kconfig | 6 | ||||
-rw-r--r-- | drivers/video/omap2/displays/Makefile | 1 | ||||
-rw-r--r-- | drivers/video/omap2/displays/panel-toppoly-tdo35s.c | 112 |
3 files changed, 119 insertions, 0 deletions
diff --git a/drivers/video/omap2/displays/Kconfig b/drivers/video/omap2/displays/Kconfig index 4ce47ddffd3c..4d95ed52886c 100644 --- a/drivers/video/omap2/displays/Kconfig +++ b/drivers/video/omap2/displays/Kconfig | |||
@@ -25,4 +25,10 @@ config PANEL_TAAL | |||
25 | help | 25 | help |
26 | Taal DSI command mode panel from TPO. | 26 | Taal DSI command mode panel from TPO. |
27 | 27 | ||
28 | config PANEL_TOPPOLY_TDO35S | ||
29 | tristate "Toppoly TDO35S LCD Panel support" | ||
30 | depends on OMAP2_DSS | ||
31 | help | ||
32 | LCD Panel used in CM-T35 | ||
33 | |||
28 | endmenu | 34 | endmenu |
diff --git a/drivers/video/omap2/displays/Makefile b/drivers/video/omap2/displays/Makefile index 8f3d0adc7612..e75cc70415ff 100644 --- a/drivers/video/omap2/displays/Makefile +++ b/drivers/video/omap2/displays/Makefile | |||
@@ -3,3 +3,4 @@ obj-$(CONFIG_PANEL_SHARP_LS037V7DW01) += panel-sharp-ls037v7dw01.o | |||
3 | obj-$(CONFIG_PANEL_SHARP_LQ043T1DG01) += panel-sharp-lq043t1dg01.o | 3 | obj-$(CONFIG_PANEL_SHARP_LQ043T1DG01) += panel-sharp-lq043t1dg01.o |
4 | 4 | ||
5 | obj-$(CONFIG_PANEL_TAAL) += panel-taal.o | 5 | obj-$(CONFIG_PANEL_TAAL) += panel-taal.o |
6 | obj-$(CONFIG_PANEL_TOPPOLY_TDO35S) += panel-toppoly-tdo35s.o \ No newline at end of file | ||
diff --git a/drivers/video/omap2/displays/panel-toppoly-tdo35s.c b/drivers/video/omap2/displays/panel-toppoly-tdo35s.c new file mode 100644 index 000000000000..e744b8c83817 --- /dev/null +++ b/drivers/video/omap2/displays/panel-toppoly-tdo35s.c | |||
@@ -0,0 +1,112 @@ | |||
1 | /* | ||
2 | * LCD panel driver for Toppoly TDO35S | ||
3 | * | ||
4 | * Copyright (C) 2009 CompuLab, Ltd. | ||
5 | * Author: Mike Rapoport <mike@compulab.co.il> | ||
6 | * | ||
7 | * Based on generic panel support | ||
8 | * Copyright (C) 2008 Nokia Corporation | ||
9 | * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com> | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify it | ||
12 | * under the terms of the GNU General Public License version 2 as published by | ||
13 | * the Free Software Foundation. | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
16 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
17 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
18 | * more details. | ||
19 | * | ||
20 | * You should have received a copy of the GNU General Public License along with | ||
21 | * this program. If not, see <http://www.gnu.org/licenses/>. | ||
22 | */ | ||
23 | |||
24 | #include <linux/module.h> | ||
25 | #include <linux/delay.h> | ||
26 | |||
27 | #include <plat/display.h> | ||
28 | |||
29 | static struct omap_video_timings toppoly_tdo_panel_timings = { | ||
30 | /* 640 x 480 @ 60 Hz Reduced blanking VESA CVT 0.31M3-R */ | ||
31 | .x_res = 480, | ||
32 | .y_res = 640, | ||
33 | |||
34 | .pixel_clock = 26000, | ||
35 | |||
36 | .hfp = 104, | ||
37 | .hsw = 8, | ||
38 | .hbp = 8, | ||
39 | |||
40 | .vfp = 4, | ||
41 | .vsw = 2, | ||
42 | .vbp = 2, | ||
43 | }; | ||
44 | |||
45 | static int toppoly_tdo_panel_probe(struct omap_dss_device *dssdev) | ||
46 | { | ||
47 | dssdev->panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS | | ||
48 | OMAP_DSS_LCD_IHS; | ||
49 | dssdev->panel.timings = toppoly_tdo_panel_timings; | ||
50 | |||
51 | return 0; | ||
52 | } | ||
53 | |||
54 | static void toppoly_tdo_panel_remove(struct omap_dss_device *dssdev) | ||
55 | { | ||
56 | } | ||
57 | |||
58 | static int toppoly_tdo_panel_enable(struct omap_dss_device *dssdev) | ||
59 | { | ||
60 | int r = 0; | ||
61 | |||
62 | if (dssdev->platform_enable) | ||
63 | r = dssdev->platform_enable(dssdev); | ||
64 | |||
65 | return r; | ||
66 | } | ||
67 | |||
68 | static void toppoly_tdo_panel_disable(struct omap_dss_device *dssdev) | ||
69 | { | ||
70 | if (dssdev->platform_disable) | ||
71 | dssdev->platform_disable(dssdev); | ||
72 | } | ||
73 | |||
74 | static int toppoly_tdo_panel_suspend(struct omap_dss_device *dssdev) | ||
75 | { | ||
76 | toppoly_tdo_panel_disable(dssdev); | ||
77 | return 0; | ||
78 | } | ||
79 | |||
80 | static int toppoly_tdo_panel_resume(struct omap_dss_device *dssdev) | ||
81 | { | ||
82 | return toppoly_tdo_panel_enable(dssdev); | ||
83 | } | ||
84 | |||
85 | static struct omap_dss_driver generic_driver = { | ||
86 | .probe = toppoly_tdo_panel_probe, | ||
87 | .remove = toppoly_tdo_panel_remove, | ||
88 | |||
89 | .enable = toppoly_tdo_panel_enable, | ||
90 | .disable = toppoly_tdo_panel_disable, | ||
91 | .suspend = toppoly_tdo_panel_suspend, | ||
92 | .resume = toppoly_tdo_panel_resume, | ||
93 | |||
94 | .driver = { | ||
95 | .name = "toppoly_tdo35s_panel", | ||
96 | .owner = THIS_MODULE, | ||
97 | }, | ||
98 | }; | ||
99 | |||
100 | static int __init toppoly_tdo_panel_drv_init(void) | ||
101 | { | ||
102 | return omap_dss_register_driver(&generic_driver); | ||
103 | } | ||
104 | |||
105 | static void __exit toppoly_tdo_panel_drv_exit(void) | ||
106 | { | ||
107 | omap_dss_unregister_driver(&generic_driver); | ||
108 | } | ||
109 | |||
110 | module_init(toppoly_tdo_panel_drv_init); | ||
111 | module_exit(toppoly_tdo_panel_drv_exit); | ||
112 | MODULE_LICENSE("GPL"); | ||