1 From a23b9064217c6ea6f04e71063c2dc90d121269b8 Mon Sep 17 00:00:00 2001
2 From: Steve Sakoman <steve@sakoman.com>
3 Date: Tue, 23 Feb 2010 14:40:27 -0800
4 Subject: [PATCH 19/48] OMAP: DSS2: Add support for Samsung LTE430WQ-F0C panel
7 .../omap2/displays/panel-samsung-lte430wq-f0c.c | 154 ++++++++++++++++++++
8 1 files changed, 154 insertions(+), 0 deletions(-)
9 create mode 100644 drivers/video/omap2/displays/panel-samsung-lte430wq-f0c.c
11 diff --git a/drivers/video/omap2/displays/panel-samsung-lte430wq-f0c.c b/drivers/video/omap2/displays/panel-samsung-lte430wq-f0c.c
13 index 0000000..6a29f9c
15 +++ b/drivers/video/omap2/displays/panel-samsung-lte430wq-f0c.c
18 + * LCD panel driver for Samsung LTE430WQ-F0C
20 + * Author: Steve Sakoman <steve@sakoman.com>
22 + * This program is free software; you can redistribute it and/or modify it
23 + * under the terms of the GNU General Public License version 2 as published by
24 + * the Free Software Foundation.
26 + * This program is distributed in the hope that it will be useful, but WITHOUT
27 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
28 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
31 + * You should have received a copy of the GNU General Public License along with
32 + * this program. If not, see <http://www.gnu.org/licenses/>.
35 +#include <linux/module.h>
36 +#include <linux/delay.h>
38 +#include <plat/display.h>
40 +static struct omap_video_timings samsung_lte_timings = {
44 + .pixel_clock = 9200,
55 +static int samsung_lte_panel_power_on(struct omap_dss_device *dssdev)
59 + if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
62 + r = omapdss_dpi_display_enable(dssdev);
66 + if (dssdev->platform_enable) {
67 + r = dssdev->platform_enable(dssdev);
74 + omapdss_dpi_display_disable(dssdev);
79 +static void samsung_lte_panel_power_off(struct omap_dss_device *dssdev)
81 + if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE)
84 + if (dssdev->platform_disable)
85 + dssdev->platform_disable(dssdev);
87 + omapdss_dpi_display_disable(dssdev);
90 +static int samsung_lte_panel_probe(struct omap_dss_device *dssdev)
92 + dssdev->panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
94 + dssdev->panel.timings = samsung_lte_timings;
99 +static void samsung_lte_panel_remove(struct omap_dss_device *dssdev)
103 +static int samsung_lte_panel_enable(struct omap_dss_device *dssdev)
107 + r = samsung_lte_panel_power_on(dssdev);
111 + dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
116 +static void samsung_lte_panel_disable(struct omap_dss_device *dssdev)
118 + samsung_lte_panel_power_off(dssdev);
120 + dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
123 +static int samsung_lte_panel_suspend(struct omap_dss_device *dssdev)
125 + samsung_lte_panel_disable(dssdev);
126 + dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED;
130 +static int samsung_lte_panel_resume(struct omap_dss_device *dssdev)
134 + r = samsung_lte_panel_enable(dssdev);
138 + dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
143 +static struct omap_dss_driver samsung_lte_driver = {
144 + .probe = samsung_lte_panel_probe,
145 + .remove = samsung_lte_panel_remove,
147 + .enable = samsung_lte_panel_enable,
148 + .disable = samsung_lte_panel_disable,
149 + .suspend = samsung_lte_panel_suspend,
150 + .resume = samsung_lte_panel_resume,
153 + .name = "samsung_lte_panel",
154 + .owner = THIS_MODULE,
158 +static int __init samsung_lte_panel_drv_init(void)
160 + return omap_dss_register_driver(&samsung_lte_driver);
163 +static void __exit samsung_lte_panel_drv_exit(void)
165 + omap_dss_unregister_driver(&samsung_lte_driver);
168 +module_init(samsung_lte_panel_drv_init);
169 +module_exit(samsung_lte_panel_drv_exit);
170 +MODULE_LICENSE("GPL");