2 * File: drivers/video/omap/lcd-htcherald.c
4 * LCD panel support for the HTC Herald
6 * Copyright (C) 2009 Cory Maccarrone <darkstar6262@gmail.com>
7 * Copyright (C) 2009 Wing Linux
9 * Based on the lcd_htcwizard.c file from the linwizard project:
10 * Copyright (C) linwizard.sourceforge.net
11 * Author: Angelo Arrifano <miknix@gmail.com>
12 * Based on lcd_h4 by Imre Deak <imre.deak@nokia.com>
14 * This program is free software; you can redistribute it and/or modify it
15 * under the terms of the GNU General Public License as published by the
16 * Free Software Foundation; either version 2 of the License, or (at your
17 * option) any later version.
19 * This program is distributed in the hope that it will be useful, but
20 * WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * General Public License for more details.
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 #include <linux/module.h>
30 #include <linux/platform_device.h>
34 static int htcherald_panel_init(struct lcd_panel *panel,
35 struct omapfb_device *fbdev)
40 static void htcherald_panel_cleanup(struct lcd_panel *panel)
44 static int htcherald_panel_enable(struct lcd_panel *panel)
49 static void htcherald_panel_disable(struct lcd_panel *panel)
53 static unsigned long htcherald_panel_get_caps(struct lcd_panel *panel)
58 /* Found on WIZ200 (miknix) and some HERA110 models (darkstar62) */
59 struct lcd_panel htcherald_panel_1 = {
61 .config = OMAP_LCDC_PANEL_TFT |
64 OMAP_LCDC_INV_PIX_CLOCK,
78 .init = htcherald_panel_init,
79 .cleanup = htcherald_panel_cleanup,
80 .enable = htcherald_panel_enable,
81 .disable = htcherald_panel_disable,
82 .get_caps = htcherald_panel_get_caps,
85 static int htcherald_panel_probe(struct platform_device *pdev)
87 omapfb_register_panel(&htcherald_panel_1);
91 static int htcherald_panel_remove(struct platform_device *pdev)
96 static int htcherald_panel_suspend(struct platform_device *pdev,
102 static int htcherald_panel_resume(struct platform_device *pdev)
107 struct platform_driver htcherald_panel_driver = {
108 .probe = htcherald_panel_probe,
109 .remove = htcherald_panel_remove,
110 .suspend = htcherald_panel_suspend,
111 .resume = htcherald_panel_resume,
113 .name = "lcd_htcherald",
114 .owner = THIS_MODULE,
118 static int __init htcherald_panel_drv_init(void)
120 return platform_driver_register(&htcherald_panel_driver);
123 static void __exit htcherald_panel_drv_cleanup(void)
125 platform_driver_unregister(&htcherald_panel_driver);
128 module_init(htcherald_panel_drv_init);
129 module_exit(htcherald_panel_drv_cleanup);