aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVaibhav Hiremath <hvaibhav@ti.com>2010-01-04 09:34:15 -0500
committerTomi Valkeinen <tomi.valkeinen@nokia.com>2010-02-08 09:37:20 -0500
commit1c64606968538396ffe87eb6da4121a5bffe5e34 (patch)
treed4edbcd593860f84d928e2f37d56a030b8008a11
parent807a7515aea421f2b340140482ed4c8811c523c6 (diff)
OMAP: DSS2: Add Sharp LQ043T1DG01 panel driver
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
-rw-r--r--drivers/video/omap2/displays/Kconfig6
-rw-r--r--drivers/video/omap2/displays/Makefile1
-rw-r--r--drivers/video/omap2/displays/panel-sharp-lq043t1dg01.c120
3 files changed, 127 insertions, 0 deletions
diff --git a/drivers/video/omap2/displays/Kconfig b/drivers/video/omap2/displays/Kconfig
index b12a59c9c50a..4ce47ddffd3c 100644
--- a/drivers/video/omap2/displays/Kconfig
+++ b/drivers/video/omap2/displays/Kconfig
@@ -13,6 +13,12 @@ config PANEL_SHARP_LS037V7DW01
13 help 13 help
14 LCD Panel used in TI's SDP3430 and EVM boards 14 LCD Panel used in TI's SDP3430 and EVM boards
15 15
16config PANEL_SHARP_LQ043T1DG01
17 tristate "Sharp LQ043T1DG01 LCD Panel"
18 depends on OMAP2_DSS
19 help
20 LCD Panel used in TI's OMAP3517 EVM boards
21
16config PANEL_TAAL 22config PANEL_TAAL
17 tristate "Taal DSI Panel" 23 tristate "Taal DSI Panel"
18 depends on OMAP2_DSS_DSI 24 depends on OMAP2_DSS_DSI
diff --git a/drivers/video/omap2/displays/Makefile b/drivers/video/omap2/displays/Makefile
index 955646440b3a..8f3d0adc7612 100644
--- a/drivers/video/omap2/displays/Makefile
+++ b/drivers/video/omap2/displays/Makefile
@@ -1,4 +1,5 @@
1obj-$(CONFIG_PANEL_GENERIC) += panel-generic.o 1obj-$(CONFIG_PANEL_GENERIC) += panel-generic.o
2obj-$(CONFIG_PANEL_SHARP_LS037V7DW01) += panel-sharp-ls037v7dw01.o 2obj-$(CONFIG_PANEL_SHARP_LS037V7DW01) += panel-sharp-ls037v7dw01.o
3obj-$(CONFIG_PANEL_SHARP_LQ043T1DG01) += panel-sharp-lq043t1dg01.o
3 4
4obj-$(CONFIG_PANEL_TAAL) += panel-taal.o 5obj-$(CONFIG_PANEL_TAAL) += panel-taal.o
diff --git a/drivers/video/omap2/displays/panel-sharp-lq043t1dg01.c b/drivers/video/omap2/displays/panel-sharp-lq043t1dg01.c
new file mode 100644
index 000000000000..e75798edbb59
--- /dev/null
+++ b/drivers/video/omap2/displays/panel-sharp-lq043t1dg01.c
@@ -0,0 +1,120 @@
1/*
2 * LCD panel driver for Sharp LQ043T1DG01
3 *
4 * Copyright (C) 2009 Texas Instruments Inc
5 * Author: Vaibhav Hiremath <hvaibhav@ti.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 version 2 as published by
9 * the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * more details.
15 *
16 * You should have received a copy of the GNU General Public License along with
17 * this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#include <linux/module.h>
21#include <linux/delay.h>
22#include <linux/device.h>
23#include <linux/err.h>
24
25#include <plat/display.h>
26
27static struct omap_video_timings sharp_lq_timings = {
28 .x_res = 480,
29 .y_res = 272,
30
31 .pixel_clock = 9000,
32
33 .hsw = 42,
34 .hfp = 3,
35 .hbp = 2,
36
37 .vsw = 11,
38 .vfp = 3,
39 .vbp = 2,
40};
41
42static int sharp_lq_panel_probe(struct omap_dss_device *dssdev)
43{
44
45 dssdev->panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
46 OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IEO;
47 dssdev->panel.acb = 0x0;
48 dssdev->panel.timings = sharp_lq_timings;
49
50 return 0;
51}
52
53static void sharp_lq_panel_remove(struct omap_dss_device *dssdev)
54{
55}
56
57static int sharp_lq_panel_enable(struct omap_dss_device *dssdev)
58{
59 int r = 0;
60
61
62 /* wait couple of vsyncs until enabling the LCD */
63 msleep(50);
64
65 if (dssdev->platform_enable)
66 r = dssdev->platform_enable(dssdev);
67
68 return r;
69}
70
71static void sharp_lq_panel_disable(struct omap_dss_device *dssdev)
72{
73
74 if (dssdev->platform_disable)
75 dssdev->platform_disable(dssdev);
76
77 /* wait at least 5 vsyncs after disabling the LCD */
78
79 msleep(100);
80}
81
82static int sharp_lq_panel_suspend(struct omap_dss_device *dssdev)
83{
84 sharp_lq_panel_disable(dssdev);
85 return 0;
86}
87
88static int sharp_lq_panel_resume(struct omap_dss_device *dssdev)
89{
90 return sharp_lq_panel_enable(dssdev);
91}
92
93static struct omap_dss_driver sharp_lq_driver = {
94 .probe = sharp_lq_panel_probe,
95 .remove = sharp_lq_panel_remove,
96
97 .enable = sharp_lq_panel_enable,
98 .disable = sharp_lq_panel_disable,
99 .suspend = sharp_lq_panel_suspend,
100 .resume = sharp_lq_panel_resume,
101
102 .driver = {
103 .name = "sharp_lq_panel",
104 .owner = THIS_MODULE,
105 },
106};
107
108static int __init sharp_lq_panel_drv_init(void)
109{
110 return omap_dss_register_driver(&sharp_lq_driver);
111}
112
113static void __exit sharp_lq_panel_drv_exit(void)
114{
115 omap_dss_unregister_driver(&sharp_lq_driver);
116}
117
118module_init(sharp_lq_panel_drv_init);
119module_exit(sharp_lq_panel_drv_exit);
120MODULE_LICENSE("GPL");