2 * LCD panel driver for Sharp LS037V7DW01
4 * Copyright (C) 2008 Nokia Corporation
5 * Author: Tomi Valkeinen <tomi.valkeinen@nokia.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>
23 #include <mach/display.h>
25 static int sharp_ls_panel_init(struct omap_display *display)
30 static void sharp_ls_panel_cleanup(struct omap_display *display)
34 static int sharp_ls_panel_enable(struct omap_display *display)
38 /* wait couple of vsyncs until enabling the LCD */
41 if (display->hw_config.panel_enable)
42 r = display->hw_config.panel_enable(display);
47 static void sharp_ls_panel_disable(struct omap_display *display)
49 if (display->hw_config.panel_disable)
50 display->hw_config.panel_disable(display);
52 /* wait at least 5 vsyncs after disabling the LCD */
57 static int sharp_ls_panel_suspend(struct omap_display *display)
59 sharp_ls_panel_disable(display);
63 static int sharp_ls_panel_resume(struct omap_display *display)
65 return sharp_ls_panel_enable(display);
68 static struct omap_panel sharp_ls_panel = {
70 .name = "sharp-ls037v7dw01",
71 .init = sharp_ls_panel_init,
72 .cleanup = sharp_ls_panel_cleanup,
73 .enable = sharp_ls_panel_enable,
74 .disable = sharp_ls_panel_disable,
75 .suspend = sharp_ls_panel_suspend,
76 .resume = sharp_ls_panel_resume,
95 .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS | OMAP_DSS_LCD_IHS,
99 static int __init sharp_ls_panel_drv_init(void)
101 omap_dss_register_panel(&sharp_ls_panel);
105 static void __exit sharp_ls_panel_drv_exit(void)
107 omap_dss_unregister_panel(&sharp_ls_panel);
110 module_init(sharp_ls_panel_drv_init);
111 module_exit(sharp_ls_panel_drv_exit);
112 MODULE_LICENSE("GPL");