Full support for Ginger Console
[linux-ginger.git] / drivers / video / omap2 / displays / panel-samsung-lte430wq-f0c.c
blob3f0477e0da5589ce6c97c4c1ca4b4f61119e80b6
1 /*
2 * LCD panel driver for Samsung LTE430WQ-F0C
4 * Author: Steve Sakoman <steve@sakoman.com>
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published by
8 * the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
15 * You should have received a copy of the GNU General Public License along with
16 * this program. If not, see <http://www.gnu.org/licenses/>.
19 #include <linux/module.h>
20 #include <linux/delay.h>
22 #include <plat/display.h>
24 static struct omap_video_timings samsung_lte_timings = {
25 .x_res = 480,
26 .y_res = 272,
28 .pixel_clock = 9200,
30 .hsw = 41,
31 .hfp = 8,
32 .hbp = 45-41,
34 .vsw = 10,
35 .vfp = 4,
36 .vbp = 12-10,
39 static int samsung_lte_panel_probe(struct omap_dss_device *dssdev)
41 dssdev->panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
42 OMAP_DSS_LCD_IHS;
43 dssdev->panel.timings = samsung_lte_timings;
45 return 0;
48 static void samsung_lte_panel_remove(struct omap_dss_device *dssdev)
52 static int samsung_lte_panel_enable(struct omap_dss_device *dssdev)
54 int r = 0;
56 /* wait couple of vsyncs until enabling the LCD */
57 msleep(50);
59 if (dssdev->platform_enable)
60 r = dssdev->platform_enable(dssdev);
62 return r;
65 static void samsung_lte_panel_disable(struct omap_dss_device *dssdev)
67 if (dssdev->platform_disable)
68 dssdev->platform_disable(dssdev);
70 /* wait at least 5 vsyncs after disabling the LCD */
72 msleep(100);
75 static int samsung_lte_panel_suspend(struct omap_dss_device *dssdev)
77 samsung_lte_panel_disable(dssdev);
78 return 0;
81 static int samsung_lte_panel_resume(struct omap_dss_device *dssdev)
83 return samsung_lte_panel_enable(dssdev);
86 static struct omap_dss_driver samsung_lte_driver = {
87 .probe = samsung_lte_panel_probe,
88 .remove = samsung_lte_panel_remove,
90 .enable = samsung_lte_panel_enable,
91 .disable = samsung_lte_panel_disable,
92 .suspend = samsung_lte_panel_suspend,
93 .resume = samsung_lte_panel_resume,
95 .driver = {
96 .name = "samsung_lte_panel",
97 .owner = THIS_MODULE,
101 static int __init samsung_lte_panel_drv_init(void)
103 return omap_dss_register_driver(&samsung_lte_driver);
106 static void __exit samsung_lte_panel_drv_exit(void)
108 omap_dss_unregister_driver(&samsung_lte_driver);
111 module_init(samsung_lte_panel_drv_init);
112 module_exit(samsung_lte_panel_drv_exit);
113 MODULE_LICENSE("GPL");