1 /*
2  * LCD panel support for the Palm Zire71
3  *
4  * Original version : Romain Goyet
5  * Current version : Laurent Gonzalez
6  * Modified for zire71 : Marek Vasut
7  *
8  * This program is free software; you can redistribute it and/or modify it
9  * under the terms of the GNU General Public License as published by the
10  * Free Software Foundation; either version 2 of the License, or (at your
11  * option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License along
19  * with this program; if not, write to the Free Software Foundation, Inc.,
20  * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
21  */
22 
23 #include <linux/module.h>
24 #include <linux/platform_device.h>
25 #include <linux/io.h>
26 
27 #include "omapfb.h"
28 
palmz71_panel_get_caps(struct lcd_panel * panel)29 static unsigned long palmz71_panel_get_caps(struct lcd_panel *panel)
30 {
31 	return OMAPFB_CAPS_SET_BACKLIGHT;
32 }
33 
34 static struct lcd_panel palmz71_panel = {
35 	.name		= "palmz71",
36 	.config		= OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC |
37 			  OMAP_LCDC_INV_HSYNC | OMAP_LCDC_HSVS_RISING_EDGE |
38 			  OMAP_LCDC_HSVS_OPPOSITE,
39 	.data_lines	= 16,
40 	.bpp		= 16,
41 	.pixel_clock	= 24000,
42 	.x_res		= 320,
43 	.y_res		= 320,
44 	.hsw		= 4,
45 	.hfp		= 8,
46 	.hbp		= 28,
47 	.vsw		= 1,
48 	.vfp		= 8,
49 	.vbp		= 7,
50 	.pcd		= 0,
51 
52 	.get_caps	= palmz71_panel_get_caps,
53 };
54 
palmz71_panel_probe(struct platform_device * pdev)55 static int palmz71_panel_probe(struct platform_device *pdev)
56 {
57 	omapfb_register_panel(&palmz71_panel);
58 	return 0;
59 }
60 
61 static struct platform_driver palmz71_panel_driver = {
62 	.probe		= palmz71_panel_probe,
63 	.driver		= {
64 		.name	= "lcd_palmz71",
65 	},
66 };
67 
68 module_platform_driver(palmz71_panel_driver);
69 
70 MODULE_AUTHOR("Romain Goyet, Laurent Gonzalez, Marek Vasut");
71 MODULE_LICENSE("GPL");
72 MODULE_DESCRIPTION("LCD panel support for the Palm Zire71");
73