1 /* Copyright (c) 2008-2009, Code Aurora Forum. All rights reserved.
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.
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.
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
20 #include "mddihosti.h"
22 static int mddi_ext_lcd_on(struct platform_device
*pdev
);
23 static int mddi_ext_lcd_off(struct platform_device
*pdev
);
25 static int mddi_ext_lcd_on(struct platform_device
*pdev
)
30 static int mddi_ext_lcd_off(struct platform_device
*pdev
)
35 static int __init
mddi_ext_lcd_probe(struct platform_device
*pdev
)
37 msm_fb_add_device(pdev
);
42 static struct platform_driver this_driver
= {
43 .probe
= mddi_ext_lcd_probe
,
45 .name
= "extmddi_svga",
49 static struct msm_fb_panel_data mddi_ext_lcd_panel_data
= {
50 .panel_info
.xres
= 800,
51 .panel_info
.yres
= 600,
52 .panel_info
.type
= EXT_MDDI_PANEL
,
53 .panel_info
.pdest
= DISPLAY_1
,
54 .panel_info
.wait_cycle
= 0,
56 .panel_info
.fb_num
= 2,
57 .panel_info
.clk_rate
= 122880000,
58 .panel_info
.clk_min
= 120000000,
59 .panel_info
.clk_max
= 125000000,
60 .on
= mddi_ext_lcd_on
,
61 .off
= mddi_ext_lcd_off
,
64 static struct platform_device this_device
= {
65 .name
= "extmddi_svga",
68 .platform_data
= &mddi_ext_lcd_panel_data
,
72 static int __init
mddi_ext_lcd_init(void)
75 struct msm_panel_info
*pinfo
;
77 ret
= platform_driver_register(&this_driver
);
79 pinfo
= &mddi_ext_lcd_panel_data
.panel_info
;
80 pinfo
->lcd
.vsync_enable
= FALSE
;
81 pinfo
->mddi
.vdopkt
= MDDI_DEFAULT_PRIM_PIX_ATTR
;
83 ret
= platform_device_register(&this_device
);
85 platform_driver_unregister(&this_driver
);
91 module_init(mddi_ext_lcd_init
);