2 * LCD panel driver for Sharp LQ043T1DG01
4 * Copyright (C) 2009 Texas Instruments Inc
5 * Author: Vaibhav Hiremath <hvaibhav@ti.com>
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.
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
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/>.
20 #include <linux/module.h>
21 #include <linux/delay.h>
22 #include <linux/device.h>
23 #include <linux/err.h>
25 #include <plat/display.h>
27 static struct omap_video_timings sharp_lq_timings
= {
42 static int sharp_lq_panel_probe(struct omap_dss_device
*dssdev
)
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
;
53 static void sharp_lq_panel_remove(struct omap_dss_device
*dssdev
)
57 static int sharp_lq_panel_enable(struct omap_dss_device
*dssdev
)
62 /* wait couple of vsyncs until enabling the LCD */
65 if (dssdev
->platform_enable
)
66 r
= dssdev
->platform_enable(dssdev
);
71 static void sharp_lq_panel_disable(struct omap_dss_device
*dssdev
)
74 if (dssdev
->platform_disable
)
75 dssdev
->platform_disable(dssdev
);
77 /* wait at least 5 vsyncs after disabling the LCD */
82 static int sharp_lq_panel_suspend(struct omap_dss_device
*dssdev
)
84 sharp_lq_panel_disable(dssdev
);
88 static int sharp_lq_panel_resume(struct omap_dss_device
*dssdev
)
90 return sharp_lq_panel_enable(dssdev
);
93 static struct omap_dss_driver sharp_lq_driver
= {
94 .probe
= sharp_lq_panel_probe
,
95 .remove
= sharp_lq_panel_remove
,
97 .enable
= sharp_lq_panel_enable
,
98 .disable
= sharp_lq_panel_disable
,
99 .suspend
= sharp_lq_panel_suspend
,
100 .resume
= sharp_lq_panel_resume
,
103 .name
= "sharp_lq_panel",
104 .owner
= THIS_MODULE
,
108 static int __init
sharp_lq_panel_drv_init(void)
110 return omap_dss_register_driver(&sharp_lq_driver
);
113 static void __exit
sharp_lq_panel_drv_exit(void)
115 omap_dss_unregister_driver(&sharp_lq_driver
);
118 module_init(sharp_lq_panel_drv_init
);
119 module_exit(sharp_lq_panel_drv_exit
);
120 MODULE_LICENSE("GPL");