Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
[pandora-kernel.git] / drivers / staging / msm / lcdc_grapefruit.c
1 /* Copyright (c) 2009, Code Aurora Forum. All rights reserved.
2  *
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License version 2 and
5  * only version 2 as published by the Free Software Foundation.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15  * 02110-1301, USA.
16  */
17
18 #include "msm_fb.h"
19
20 #ifdef CONFIG_FB_MSM_TRY_MDDI_CATCH_LCDC_PRISM
21 #include "mddihosti.h"
22 #endif
23
24 static int __init lcdc_grapefruit_init(void)
25 {
26         int ret;
27         struct msm_panel_info pinfo;
28
29 #ifdef CONFIG_FB_MSM_TRY_MDDI_CATCH_LCDC_PRISM
30         if (msm_fb_detect_client("lcdc_grapefruit_vga"))
31                 return 0;
32 #endif
33
34         pinfo.xres = 1024;
35         pinfo.yres = 600;
36         pinfo.type = LCDC_PANEL;
37         pinfo.pdest = DISPLAY_1;
38         pinfo.wait_cycle = 0;
39         pinfo.bpp = 18;
40         pinfo.fb_num = 2;
41         pinfo.clk_rate = 40000000;
42
43         pinfo.lcdc.h_back_porch = 88;
44         pinfo.lcdc.h_front_porch = 40;
45         pinfo.lcdc.h_pulse_width = 128;
46         pinfo.lcdc.v_back_porch = 23;
47         pinfo.lcdc.v_front_porch = 1;
48         pinfo.lcdc.v_pulse_width = 4;
49         pinfo.lcdc.border_clr = 0;      /* blk */
50         pinfo.lcdc.underflow_clr = 0xff;        /* blue */
51         pinfo.lcdc.hsync_skew = 0;
52
53         ret = lcdc_device_register(&pinfo);
54         if (ret)
55                 printk(KERN_ERR "%s: failed to register device!\n", __func__);
56
57         return ret;
58 }
59
60 module_init(lcdc_grapefruit_init);