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 prism_lcd_on(struct platform_device *pdev);
23 static int prism_lcd_off(struct platform_device *pdev);
25 static int prism_lcd_on(struct platform_device *pdev)
27 /* Set the MDP pixel data attributes for Primary Display */
28 mddi_host_write_pix_attr_reg(0x00C3);
33 static int prism_lcd_off(struct platform_device *pdev)
38 static int __init prism_probe(struct platform_device *pdev)
40 msm_fb_add_device(pdev);
45 static struct platform_driver this_driver = {
48 .name = "mddi_prism_wvga",
52 static struct msm_fb_panel_data prism_panel_data = {
57 static struct platform_device this_device = {
58 .name = "mddi_prism_wvga",
61 .platform_data = &prism_panel_data,
65 static int __init prism_init(void)
68 struct msm_panel_info *pinfo;
70 #ifdef CONFIG_FB_MSM_MDDI_AUTO_DETECT
73 ret = msm_fb_detect_client("mddi_prism_wvga");
78 id = mddi_get_client_id();
80 if (((id >> 16) != 0x4474) || ((id & 0xffff) == 0x8960))
84 ret = platform_driver_register(&this_driver);
86 pinfo = &prism_panel_data.panel_info;
89 pinfo->type = MDDI_PANEL;
90 pinfo->pdest = DISPLAY_1;
91 pinfo->mddi.vdopkt = MDDI_DEFAULT_PRIM_PIX_ATTR;
92 pinfo->wait_cycle = 0;
95 pinfo->clk_rate = 153600000;
96 pinfo->clk_min = 150000000;
97 pinfo->clk_max = 160000000;
98 pinfo->lcd.vsync_enable = TRUE;
99 pinfo->lcd.refx100 = 6050;
100 pinfo->lcd.v_back_porch = 23;
101 pinfo->lcd.v_front_porch = 20;
102 pinfo->lcd.v_pulse_width = 105;
103 pinfo->lcd.hw_vsync_mode = TRUE;
104 pinfo->lcd.vsync_notifier_period = 0;
106 ret = platform_device_register(&this_device);
108 platform_driver_unregister(&this_driver);
114 module_init(prism_init);