linux-omap-psp 2.6.32: add patches from Mans Rullgard to help finding the DM37xx...
[openembedded.git] / recipes / linux / linux-omap-psp-2.6.32 / 0028-OMAP-DSS2-Re-add-support-for-Samsung-lte430wq-f0c-pa.patch
blob7d97013b8d50b7b35f318a37e12be232dd6a5833
1 From 7bf370db8ac5fa45290c3116c9f02271d9b40f2f Mon Sep 17 00:00:00 2001
2 From: Koen Kooi <koen@dominion.thruhere.net>
3 Date: Mon, 15 Feb 2010 14:38:00 +0100
4 Subject: [PATCH 28/42] OMAP: DSS2: (Re)add support for Samsung lte430wq-f0c panel
6 ---
7 drivers/video/omap2/displays/Kconfig | 6 +
8 drivers/video/omap2/displays/Makefile | 1 +
9 .../omap2/displays/panel-samsung-lte430wq-f0c.c | 113 ++++++++++++++++++++
10 3 files changed, 120 insertions(+), 0 deletions(-)
11 create mode 100644 drivers/video/omap2/displays/panel-samsung-lte430wq-f0c.c
13 diff --git a/drivers/video/omap2/displays/Kconfig b/drivers/video/omap2/displays/Kconfig
14 index 4ce47dd..4229a28 100644
15 --- a/drivers/video/omap2/displays/Kconfig
16 +++ b/drivers/video/omap2/displays/Kconfig
17 @@ -7,6 +7,12 @@ config PANEL_GENERIC
18 Generic panel driver.
19 Used for DVI output for Beagle and OMAP3 SDP.
21 +config PANEL_SAMSUNG_LTE430WQ_F0C
22 + tristate "Samsung LTE430WQ-F0C LCD Panel"
23 + depends on OMAP2_DSS
24 + help
25 + LCD Panel used on Overo Palo43
27 config PANEL_SHARP_LS037V7DW01
28 tristate "Sharp LS037V7DW01 LCD Panel"
29 depends on OMAP2_DSS
30 diff --git a/drivers/video/omap2/displays/Makefile b/drivers/video/omap2/displays/Makefile
31 index 8f3d0ad..9317445 100644
32 --- a/drivers/video/omap2/displays/Makefile
33 +++ b/drivers/video/omap2/displays/Makefile
34 @@ -1,4 +1,5 @@
35 obj-$(CONFIG_PANEL_GENERIC) += panel-generic.o
36 +obj-$(CONFIG_PANEL_SAMSUNG_LTE430WQ_F0C) += panel-samsung-lte430wq-f0c.o
37 obj-$(CONFIG_PANEL_SHARP_LS037V7DW01) += panel-sharp-ls037v7dw01.o
38 obj-$(CONFIG_PANEL_SHARP_LQ043T1DG01) += panel-sharp-lq043t1dg01.o
40 diff --git a/drivers/video/omap2/displays/panel-samsung-lte430wq-f0c.c b/drivers/video/omap2/displays/panel-samsung-lte430wq-f0c.c
41 new file mode 100644
42 index 0000000..3f0477e
43 --- /dev/null
44 +++ b/drivers/video/omap2/displays/panel-samsung-lte430wq-f0c.c
45 @@ -0,0 +1,113 @@
46 +/*
47 + * LCD panel driver for Samsung LTE430WQ-F0C
48 + *
49 + * Author: Steve Sakoman <steve@sakoman.com>
50 + *
51 + * This program is free software; you can redistribute it and/or modify it
52 + * under the terms of the GNU General Public License version 2 as published by
53 + * the Free Software Foundation.
54 + *
55 + * This program is distributed in the hope that it will be useful, but WITHOUT
56 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
57 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
58 + * more details.
59 + *
60 + * You should have received a copy of the GNU General Public License along with
61 + * this program. If not, see <http://www.gnu.org/licenses/>.
62 + */
64 +#include <linux/module.h>
65 +#include <linux/delay.h>
67 +#include <plat/display.h>
69 +static struct omap_video_timings samsung_lte_timings = {
70 + .x_res = 480,
71 + .y_res = 272,
73 + .pixel_clock = 9200,
75 + .hsw = 41,
76 + .hfp = 8,
77 + .hbp = 45-41,
79 + .vsw = 10,
80 + .vfp = 4,
81 + .vbp = 12-10,
82 +};
84 +static int samsung_lte_panel_probe(struct omap_dss_device *dssdev)
86 + dssdev->panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
87 + OMAP_DSS_LCD_IHS;
88 + dssdev->panel.timings = samsung_lte_timings;
90 + return 0;
93 +static void samsung_lte_panel_remove(struct omap_dss_device *dssdev)
97 +static int samsung_lte_panel_enable(struct omap_dss_device *dssdev)
99 + int r = 0;
101 + /* wait couple of vsyncs until enabling the LCD */
102 + msleep(50);
104 + if (dssdev->platform_enable)
105 + r = dssdev->platform_enable(dssdev);
107 + return r;
110 +static void samsung_lte_panel_disable(struct omap_dss_device *dssdev)
112 + if (dssdev->platform_disable)
113 + dssdev->platform_disable(dssdev);
115 + /* wait at least 5 vsyncs after disabling the LCD */
117 + msleep(100);
120 +static int samsung_lte_panel_suspend(struct omap_dss_device *dssdev)
122 + samsung_lte_panel_disable(dssdev);
123 + return 0;
126 +static int samsung_lte_panel_resume(struct omap_dss_device *dssdev)
128 + return samsung_lte_panel_enable(dssdev);
131 +static struct omap_dss_driver samsung_lte_driver = {
132 + .probe = samsung_lte_panel_probe,
133 + .remove = samsung_lte_panel_remove,
135 + .enable = samsung_lte_panel_enable,
136 + .disable = samsung_lte_panel_disable,
137 + .suspend = samsung_lte_panel_suspend,
138 + .resume = samsung_lte_panel_resume,
140 + .driver = {
141 + .name = "samsung_lte_panel",
142 + .owner = THIS_MODULE,
143 + },
146 +static int __init samsung_lte_panel_drv_init(void)
148 + return omap_dss_register_driver(&samsung_lte_driver);
151 +static void __exit samsung_lte_panel_drv_exit(void)
153 + omap_dss_unregister_driver(&samsung_lte_driver);
156 +module_init(samsung_lte_panel_drv_init);
157 +module_exit(samsung_lte_panel_drv_exit);
158 +MODULE_LICENSE("GPL");
160 1.6.6.1