static int __init lcdc_external_init(void)
{
	int ret;
	struct msm_panel_info pinfo;

	if (msm_fb_detect_client("lcdc_external"))
		return 0;

	pinfo.xres = 1280;
	pinfo.yres = 720;
	MSM_FB_SINGLE_MODE_PANEL(&pinfo);
	pinfo.type = LCDC_PANEL;
	pinfo.pdest = DISPLAY_1;
	pinfo.wait_cycle = 0;
	pinfo.bpp = 24;
	pinfo.fb_num = 2;
	pinfo.clk_rate = 74250000;

	pinfo.lcdc.h_back_porch = 124;
	pinfo.lcdc.h_front_porch = 110;
	pinfo.lcdc.h_pulse_width = 136;
	pinfo.lcdc.v_back_porch = 19;
	pinfo.lcdc.v_front_porch = 5;
	pinfo.lcdc.v_pulse_width = 6;
	pinfo.lcdc.border_clr = 0;	/*     */
	pinfo.lcdc.underflow_clr = 0xff;	/*      */
	pinfo.lcdc.hsync_skew = 0;

	ret = lcdc_device_register(&pinfo);
	if (ret)
		printk(KERN_ERR "%s: failed to register device!\n", __func__);

	return ret;
}
static int __init tmd20qvga_init(void)
{
	int ret;
	struct msm_panel_info *pinfo;

	ret = platform_driver_register(&this_driver);
	if (!ret) {
		pinfo = &tmd20qvga_panel_data.panel_info;
		pinfo->xres = 240;
		pinfo->yres = 320;
		MSM_FB_SINGLE_MODE_PANEL(pinfo);
		pinfo->type = EBI2_PANEL;
		pinfo->pdest = DISPLAY_1;
		pinfo->wait_cycle = 0x808000;
#ifdef TMD20QVGA_LCD_18BPP
		pinfo->bpp = 18;
#else
		pinfo->bpp = 16;
#endif
		pinfo->fb_num = 2;
		pinfo->lcd.vsync_enable = TRUE;
		pinfo->lcd.refx100 = 6000;
		pinfo->lcd.v_back_porch = 16;
		pinfo->lcd.v_front_porch = 4;
		pinfo->lcd.v_pulse_width = 0;
		pinfo->lcd.hw_vsync_mode = FALSE;
		pinfo->lcd.vsync_notifier_period = 0;

		ret = platform_device_register(&this_device);
		if (ret)
			platform_driver_unregister(&this_driver);
	}

	return ret;
}
예제 #3
0
static int __init epsonQcif_init(void)
{
	int ret;
	struct msm_panel_info *pinfo;

	ret = platform_driver_register(&this_driver);
	if (!ret) {
		pinfo = &epsonQcif_panel_data.panel_info;
		pinfo->xres = QCIF_WIDTH;
		pinfo->yres = QCIF_HEIGHT;
		MSM_FB_SINGLE_MODE_PANEL(pinfo);
		pinfo->type = EBI2_PANEL;
		pinfo->pdest = DISPLAY_2;
		pinfo->wait_cycle = 0x808000;
		pinfo->bpp = 16;
		pinfo->fb_num = 2;
		pinfo->lcd.vsync_enable = FALSE;

		ret = platform_device_register(&this_device);
		if (ret)
			platform_driver_unregister(&this_driver);
	}

	return ret;
}
예제 #4
0
static int __init lcdc_p5lte_panel_init(void)
{
	int ret;
	struct msm_panel_info *pinfo;

	DPRINT("start %s\n", __func__);	
	
	ret = platform_driver_register(&this_driver);
	if (ret)
	{
		printk(KERN_ERR "%s: platform_driver_register failed! ret=%d\n", __func__, ret); 
		return ret;
	}
        DPRINT("platform_driver_register(&this_driver) is done \n");
	pinfo = &p5lte_panel_data.panel_info;
	
	pinfo->xres = LCDC_FB_XRES;
	pinfo->yres = LCDC_FB_YRES;
	MSM_FB_SINGLE_MODE_PANEL(pinfo);
	pinfo->type = LCDC_PANEL;
	pinfo->pdest = DISPLAY_1;
	pinfo->wait_cycle = 0;
	pinfo->bpp = 32;
	pinfo->fb_num = 2;
#if 0
  	pinfo->clk_rate = 76800000;
#else
	pinfo->clk_rate = 69300000;
//	pinfo->clk_rate = 71100000;
#endif
	pinfo->bl_max = 255;
	pinfo->bl_min = 1;

	pinfo->lcdc.h_back_porch = LCDC_HBP;
	pinfo->lcdc.h_front_porch = LCDC_HFP;
	pinfo->lcdc.h_pulse_width = LCDC_HPW;
	pinfo->lcdc.v_back_porch = LCDC_VBP;
	pinfo->lcdc.v_front_porch = LCDC_VFP;
	pinfo->lcdc.v_pulse_width = LCDC_VPW;

	pinfo->lcdc.border_clr = 0;     /* blk */
#if 0
	pinfo->lcdc.underflow_clr = 0xff;       /* blue */
#else
	pinfo->lcdc.underflow_clr = 0x00;       /* blue */
#endif
	pinfo->lcdc.hsync_skew = 0;

	ret = platform_device_register(&this_device);
	DPRINT("platform_device_register(&this_device) is done \n");
	if (ret)
	{
		printk(KERN_ERR "%s: platform_device_register failed! ret=%d\n", __func__, ret); 
		platform_driver_unregister(&this_driver);
	}


	return ret;
}
예제 #5
0
static int __init lcdc_ld9040_panel_init(void)
{
	int ret;
	struct msm_panel_info *pinfo;

#ifdef CONFIG_FB_MSM_MDDI_AUTO_DETECT
	if (msm_fb_detect_client("lcdc_ld9040_wvga"))
	{
		printk(KERN_ERR "%s: msm_fb_detect_client failed!\n", __func__); 
		return 0;
	}
#endif
	DPRINT("start %s\n", __func__);	
	
	ret = platform_driver_register(&this_driver);
	if (ret)
	{
		printk(KERN_ERR "%s: platform_driver_register failed! ret=%d\n", __func__, ret); 
		return ret;
	}
        DPRINT("platform_driver_register(&this_driver) is done \n");
	pinfo = &ld9040_panel_data.panel_info;
	
	pinfo->xres = LCDC_FB_XRES;
	pinfo->yres = LCDC_FB_YRES;
	MSM_FB_SINGLE_MODE_PANEL(pinfo);
	pinfo->type = LCDC_PANEL;
	pinfo->pdest = DISPLAY_1;
	pinfo->wait_cycle = 0;
	pinfo->bpp = 32;
	pinfo->fb_num = 2;
  	pinfo->clk_rate = 76800000;//24576000;
	pinfo->bl_max = 255;
	pinfo->bl_min = 1;

	pinfo->lcdc.h_back_porch = LCDC_HBP;
	pinfo->lcdc.h_front_porch = LCDC_HFP;
	pinfo->lcdc.h_pulse_width = LCDC_HPW;
	pinfo->lcdc.v_back_porch = LCDC_VBP;
	pinfo->lcdc.v_front_porch = LCDC_VFP;
	pinfo->lcdc.v_pulse_width = LCDC_VPW;

	pinfo->lcdc.border_clr = 0;     /* blk */
	pinfo->lcdc.underflow_clr = 0xff;       /* blue */
	pinfo->lcdc.hsync_skew = 0;

	ret = platform_device_register(&this_device);
	DPRINT("platform_device_register(&this_device) is done \n");
	if (ret)
	{
		printk(KERN_ERR "%s: platform_device_register failed! ret=%d\n", __func__, ret); 
		platform_driver_unregister(&this_driver);
	}

	return ret;
}
예제 #6
0
static int __init lcdc_common_panel_init(void)
{
      int ret;
      struct msm_panel_info *pinfo;

      ret = platform_driver_register(&this_driver);
      if (ret)
            return ret;

      pinfo = &common_pt_panel_data.panel_info;

#ifdef CONFIG_FB_MSM_LCDC_COMMON_SVGA_PANEL
      pinfo->xres = 600;
      pinfo->yres = 800;
      MSM_FB_SINGLE_MODE_PANEL(pinfo);
      pinfo->type = LCDC_PANEL;
      pinfo->pdest = DISPLAY_1;
      pinfo->bl_max = 16;
      pinfo->wait_cycle = 0;
#ifdef CONFIG_FB_MSM_DEFAULT_DEPTH_RGB565
      pinfo->bpp = 16;
#else
      pinfo->bpp = 24;
#endif
      pinfo->fb_num = 2;
#if 0
      pinfo->clk_rate = 24576 * 1000;// - 500;
#else
      pinfo->clk_rate = 30720 * 1000;// - 500;
#endif

      pinfo->lcdc.h_back_porch =12;
      pinfo->lcdc.h_front_porch = 18;
      pinfo->lcdc.h_pulse_width = 6;
      pinfo->lcdc.v_back_porch = 4;
      pinfo->lcdc.v_front_porch = 6;
      pinfo->lcdc.v_pulse_width = 2;
      pinfo->lcdc.border_clr = 0;      /* blk */
      pinfo->lcdc.underflow_clr = 0x00;      /* blue -> black*/
      pinfo->lcdc.hsync_skew = 0;
	
#endif 
      ret = platform_device_register(&this_device);
      if (ret) {
            printk(KERN_ERR "%s not able to register the device\n",
                   __func__);
            goto fail_driver;
      }

      return ret;

fail_driver:
      platform_driver_unregister(&this_driver);

      return ret;
}
예제 #7
0
static int __init tc358723xbg_panel_init(void)
{
    int ret;
    struct msm_panel_info pinfo;

    if( 0x00 != g_disp_board_check_flag )
    {
         /* DTS(WS0) is not detect */
         return 0;
    }

    /* Panel information setting */
    pinfo.xres                      = 480;
    pinfo.yres                      = 800;
    pinfo.bpp                       = 18;

    pinfo.wait_cycle                = 0;        /* Waiting time to becoming of MDDI active */

    pinfo.bl_max                    = 0;        /* not used */
    pinfo.bl_min                    = 0;        /* not used */
    pinfo.fb_num                    = 2;

    MSM_FB_SINGLE_MODE_PANEL(&pinfo);

    pinfo.mddi.vdopkt               = MDDI_DEFAULT_PRIM_PIX_ATTR;

    /* Panel information setting (the above screen) */
    pinfo.pdest                     = DISPLAY_1;
    pinfo.type                      = MDDI_PANEL;

    pinfo.clk_rate                  = 192000000; /* MDDI TX rate Hz */
    pinfo.clk_min                   = 192000000; /* It makes it more than this value the lowest. */
    pinfo.clk_max                   = 200000000;

    pinfo.lcd.vsync_enable          = FALSE;
    pinfo.lcd.refx100               = 6244;     /* 100 times refresh rate */
    pinfo.lcd.v_back_porch          = 8;
    pinfo.lcd.v_front_porch         = 12;
    pinfo.lcd.v_pulse_width         = 5;
    pinfo.lcd.hw_vsync_mode         = FALSE;
    pinfo.lcd.vsync_notifier_period = (1 * HZ);

    /* Panel information registration (the above screen) */
    ret = mddi_tc358723xbg_device_register(&pinfo);

    if (ret) {
        printk(KERN_ERR "%s: failed to register device!<UP>\n", __func__);
        return ret;
    }

    return ret;
}
예제 #8
0
static int __init lcdc_samsung_panel_init(void)
{
	int ret;
	struct msm_panel_info *pinfo;

#ifdef CONFIG_FB_MSM_LCDC_AUTO_DETECT
	if (msm_fb_detect_client("lcdc_samsung_wsvga"))
		return 0;
#endif

	ret = platform_driver_register(&this_driver);
	if (ret)
		return ret;

	pinfo = &samsung_panel_data.panel_info;
	pinfo->xres = 1024;
	pinfo->yres = 600;
#ifdef CONFIG_FB_MSM_LCDC_DSUB
	/* DSUB (VGA) is on the same bus, this allows us to allocate for the
	 * max resolution of the DSUB display */
	pinfo->mode2_xres = 1440;
	pinfo->mode2_yres = 900;
	pinfo->mode2_bpp = 16;
#else
	MSM_FB_SINGLE_MODE_PANEL(pinfo);
#endif
	pinfo->type = LCDC_PANEL;
	pinfo->pdest = DISPLAY_1;
	pinfo->wait_cycle = 0;
	pinfo->bpp = 18;
	pinfo->fb_num = 2;
	pinfo->clk_rate = 43192000;
	pinfo->bl_max = PWM_LEVEL;
	pinfo->bl_min = 1;

	pinfo->lcdc.h_back_porch = 80;
	pinfo->lcdc.h_front_porch = 48;
	pinfo->lcdc.h_pulse_width = 32;
	pinfo->lcdc.v_back_porch = 4;
	pinfo->lcdc.v_front_porch = 3;
	pinfo->lcdc.v_pulse_width = 1;
	pinfo->lcdc.border_clr = 0;
	pinfo->lcdc.underflow_clr = 0xff;
	pinfo->lcdc.hsync_skew = 0;

	ret = platform_device_register(&this_device);
	if (ret)
		platform_driver_unregister(&this_driver);

	return ret;
}
예제 #9
0
static int __init lvds_frc_fhd_init(void)
{
	int ret;
	struct msm_panel_info *pinfo;

	if (msm_fb_detect_client("lvds_frc_fhd"))
		return 0;

	ret = platform_driver_register(&this_driver);
	if (ret)
		return ret;

	pinfo = &lvds_frc_panel_data.panel_info;
	pinfo->xres = 1920;
	pinfo->yres = 1080;
	MSM_FB_SINGLE_MODE_PANEL(pinfo);
	pinfo->type = LVDS_PANEL;
	pinfo->pdest = DISPLAY_1;
	pinfo->wait_cycle = 0;
	pinfo->bpp = 24;
	pinfo->fb_num = 2;
	pinfo->clk_rate = 74250000;
	pinfo->bl_max = 255;
	pinfo->bl_min = 1;

	/*
	 * use hdmi 1080p60 setting, for dual channel mode,
	 * horizontal length is half.
	 */
	pinfo->lcdc.h_back_porch = 148/2;
	pinfo->lcdc.h_front_porch = 88/2;
	pinfo->lcdc.h_pulse_width = 44/2;
	pinfo->lcdc.v_back_porch = 36;
	pinfo->lcdc.v_front_porch = 4;
	pinfo->lcdc.v_pulse_width = 5;
	pinfo->lcdc.underflow_clr = 0xff;
	pinfo->lcdc.hsync_skew = 0;
	pinfo->lvds.channel_mode = LVDS_DUAL_CHANNEL_MODE;
	pinfo->lcdc.is_sync_active_high = TRUE;

	/* Set border color, padding only for reducing active display region */
	pinfo->lcdc.border_clr = 0x0;
	pinfo->lcdc.xres_pad = 0;
	pinfo->lcdc.yres_pad = 0;

	ret = platform_device_register(&this_device);
	if (ret)
		platform_driver_unregister(&this_driver);

	return ret;
}
예제 #10
0
static int __init mddi_toshiba_wvga_pt_init(void)
{
	int ret;
#ifdef CONFIG_FB_MSM_MDDI_AUTO_DETECT
	uint id;

	ret = msm_fb_detect_client("mddi_toshiba_wvga_pt");
	if (ret == -ENODEV)
		return 0;

	if (ret) {
		id = mddi_get_client_id();
		if (id != 0xd2638722)
			return 0;
	}
#endif

	pinfo.xres = 480;
	pinfo.yres = 800;
	MSM_FB_SINGLE_MODE_PANEL(&pinfo);
	pinfo.type = MDDI_PANEL;
	pinfo.pdest = DISPLAY_1;
	pinfo.mddi.vdopkt = MDDI_DEFAULT_PRIM_PIX_ATTR;
	pinfo.wait_cycle = 0;
	pinfo.bpp = 18;
	pinfo.lcd.vsync_enable = TRUE;
	pinfo.lcd.refx100 = 6102; /* adjust refx100 to prevent tearing */
	pinfo.mddi.is_type1 = TRUE;
	pinfo.lcd.v_back_porch = 8;     /* vsw=10 + vbp = 8 */
	pinfo.lcd.v_front_porch = 2;
	pinfo.lcd.v_pulse_width = 10;
	pinfo.lcd.hw_vsync_mode = FALSE;
	pinfo.lcd.vsync_notifier_period = (1 * HZ);
	pinfo.bl_max = 15;
	pinfo.bl_min = 1;
	pinfo.clk_rate = 222750000;
	pinfo.clk_min =  200000000;
	pinfo.clk_max =  240000000;
	pinfo.fb_num = 2;

	ret = mddi_toshiba_device_register(&pinfo, TOSHIBA_VGA_PRIM,
						LCD_TOSHIBA_2P4_WVGA_PT);
	if (ret)
		printk(KERN_ERR "%s: failed to register device!\n", __func__);

	return ret;
}
static int __init lcdc_chimei_lvds_panel_init(void)
{
	int ret;
	struct msm_panel_info *pinfo;

#ifdef CONFIG_FB_MSM_MIPI_PANEL_DETECT
	if (msm_fb_detect_client("lcdc_chimei_lvds_wxga"))
		return 0;
#endif

	ret = platform_driver_register(&this_driver);
	if (ret)
		return ret;

	pinfo = &chimei_panel_data.panel_info;
	pinfo->xres = 1366;
	pinfo->yres = 768;
	MSM_FB_SINGLE_MODE_PANEL(pinfo);
	pinfo->type = LCDC_PANEL;
	pinfo->pdest = DISPLAY_1;
	pinfo->wait_cycle = 0;
	pinfo->bpp = 18;
	pinfo->fb_num = 2;
	pinfo->clk_rate = 69300000;
	pinfo->bl_max = PWM_LEVEL;
	pinfo->bl_min = 1;

	/*
	 * this panel is operated by de,
	 * vsycn and hsync are ignored
	 */
	pinfo->lcdc.h_back_porch = 108;
	pinfo->lcdc.h_front_porch = 0;
	pinfo->lcdc.h_pulse_width = 1;
	pinfo->lcdc.v_back_porch = 0;
	pinfo->lcdc.v_front_porch = 16;
	pinfo->lcdc.v_pulse_width = 1;
	pinfo->lcdc.border_clr = 0;
	pinfo->lcdc.underflow_clr = 0xff;
	pinfo->lcdc.hsync_skew = 0;

	ret = platform_device_register(&this_device);
	if (ret)
		platform_driver_unregister(&this_driver);

	return ret;
}
예제 #12
0
static int __init lvds_chimei_wxga_init(void)
{
	int ret;
	struct msm_panel_info *pinfo;

	if (msm_fb_detect_client("lvds_chimei_wxga"))
		return 0;

	ret = platform_driver_register(&this_driver);
	if (ret)
		return ret;

	pinfo = &lvds_chimei_panel_data.panel_info;
	pinfo->xres = 1366;
	pinfo->yres = 768;
	MSM_FB_SINGLE_MODE_PANEL(pinfo);
	pinfo->type = LVDS_PANEL;
	pinfo->pdest = DISPLAY_1;
	pinfo->wait_cycle = 0;
	pinfo->bpp = 24;
	pinfo->fb_num = 2;
	pinfo->clk_rate = 75000000;
	pinfo->bl_max = 255;
	pinfo->bl_min = 1;

	pinfo->lcdc.h_back_porch = 0;
	pinfo->lcdc.h_front_porch = 194;
	pinfo->lcdc.h_pulse_width = 40;
	pinfo->lcdc.v_back_porch = 0;
	pinfo->lcdc.v_front_porch = 38;
	pinfo->lcdc.v_pulse_width = 20;
	pinfo->lcdc.underflow_clr = 0xff;
	pinfo->lcdc.hsync_skew = 0;
	pinfo->lvds.channel_mode = LVDS_SINGLE_CHANNEL_MODE;

	
	pinfo->lcdc.border_clr = 0x0;
	pinfo->lcdc.xres_pad = 0;
	pinfo->lcdc.yres_pad = 0;

	ret = platform_device_register(&this_device);
	if (ret)
		platform_driver_unregister(&this_driver);

	return ret;
}
예제 #13
0
static int __init mddi_samsung_innotek_hvga_init(void)
{
	int ret;
	struct msm_panel_info pinfo;
	/*u32 panel;*/

	pr_info("Swift innoteck MDDI Init\n");

	/* panel = mddi_samsung_innotek_panel_detect(); */

	pinfo.xres = 320;
	pinfo.yres = 480;
	MSM_FB_SINGLE_MODE_PANEL(&pinfo);
	pinfo.type = MDDI_PANEL;
	pinfo.pdest = DISPLAY_1;
	pinfo.mddi.vdopkt = MDDI_DEFAULT_PRIM_PIX_ATTR;
	pinfo.wait_cycle = 0;
	pinfo.bpp = 16;
	pinfo.lcd.vsync_enable = FALSE;
	/* vsync is not used 
	 * (mddi_innotek_rows_per_second * 100) /
	 * mddi_innotek_rows_per_refresh;
         */
	pinfo.lcd.refx100 = (31250 * 100) / 480;
	pinfo.lcd.v_back_porch = 14;
	pinfo.lcd.v_front_porch = 6;
	pinfo.lcd.v_pulse_width = 4;
	pinfo.lcd.hw_vsync_mode = FALSE;
	pinfo.lcd.vsync_notifier_period = (1 * HZ);

	pinfo.bl_max = 32;
	pinfo.bl_min = 1;

	pinfo.clk_rate = 122880000;
	pinfo.clk_min =  120000000;
	pinfo.clk_max =  130000000;
	pinfo.fb_num = 2;

	ret = mddi_samsung_device_register(&pinfo);
	if (ret) {
		pr_err("%s: failed to register device!\n", __func__);
		return ret;
	}
	return ret;
}
static int __init lcdc_samsung_panel_init(void)
{
	int ret;
	struct msm_panel_info *pinfo;

#ifdef CONFIG_FB_MSM_MIPI_PANEL_DETECT
	if (msm_fb_detect_client("lcdc_samsung_wsvga"))
		return 0;
#endif

	ret = platform_driver_register(&this_driver);
	if (ret)
		return ret;

	pinfo = &samsung_panel_data.panel_info;
	pinfo->xres = 1024;
	pinfo->yres = 600;
	MSM_FB_SINGLE_MODE_PANEL(pinfo);
	pinfo->type = LCDC_PANEL;
	pinfo->pdest = DISPLAY_1;
	pinfo->wait_cycle = 0;
	pinfo->bpp = 24;
	pinfo->fb_num = 2;
	pinfo->clk_rate = 51192000;
	pinfo->bl_max = 15;
	pinfo->bl_min = 1;

	pinfo->lcdc.h_back_porch = 60;
	pinfo->lcdc.h_front_porch = 36;
	pinfo->lcdc.h_pulse_width = 30;
	pinfo->lcdc.v_back_porch = 11;
	pinfo->lcdc.v_front_porch = 10;
	pinfo->lcdc.v_pulse_width = 10;
	pinfo->lcdc.border_clr = 0;
	pinfo->lcdc.underflow_clr = 0xff;
	pinfo->lcdc.hsync_skew = 0;

	ret = platform_device_register(&this_device);
	if (ret)
		platform_driver_unregister(&this_driver);

	return ret;
}
static int __init mddi_toshiba_wvga_init(void)
{
	int ret;
	struct msm_panel_info pinfo;

#ifdef CONFIG_FB_MSM_MDDI_AUTO_DETECT
	if (msm_fb_detect_client("mddi_toshiba_wvga"))
		return 0;
#endif

	pinfo.xres = 800;
	pinfo.yres = 480;
	MSM_FB_SINGLE_MODE_PANEL(&pinfo);
	pinfo.pdest = DISPLAY_2;
	pinfo.type = MDDI_PANEL;
	pinfo.mddi.vdopkt = MDDI_DEFAULT_PRIM_PIX_ATTR;
	pinfo.wait_cycle = 0;
	pinfo.bpp = 18;
	pinfo.lcd.vsync_enable = TRUE;
	pinfo.mddi.is_type1 = TRUE;
	pinfo.lcd.refx100 = 6118;
	pinfo.lcd.v_back_porch = 6;
	pinfo.lcd.v_front_porch = 0;
	pinfo.lcd.v_pulse_width = 0;
	pinfo.lcd.hw_vsync_mode = TRUE;
	pinfo.lcd.vsync_notifier_period = (1 * HZ);
	pinfo.bl_max = 4;
	pinfo.bl_min = 1;
	pinfo.clk_rate = 192000000;
	pinfo.clk_min =  190000000;
	pinfo.clk_max =  200000000;
	pinfo.fb_num = 2;

	ret = mddi_toshiba_device_register(&pinfo, TOSHIBA_VGA_PRIM,
					   LCD_TOSHIBA_2P4_WVGA);
	if (ret) {
		printk(KERN_ERR "%s: failed to register device!\n", __func__);
		return ret;
	}

	return ret;
}
예제 #16
0
static int __init lcdc_prism_init(void)
{
	int ret;
	struct msm_panel_info pinfo;

#ifdef CONFIG_FB_MSM_TRY_MDDI_CATCH_LCDC_PRISM
	ret = msm_fb_detect_client("lcdc_prism_wvga");
	if (ret == -ENODEV)
		return 0;

	if (ret && (mddi_get_client_id() != 0))
		return 0;
#endif

	pinfo.xres = 800;
	pinfo.yres = 480;
	MSM_FB_SINGLE_MODE_PANEL(&pinfo);
	pinfo.type = LCDC_PANEL;
	pinfo.pdest = DISPLAY_1;
	pinfo.wait_cycle = 0;
	pinfo.bpp = 24;
	pinfo.fb_num = 2;
	pinfo.clk_rate = 38400000;

	pinfo.lcdc.h_back_porch = 21;
	pinfo.lcdc.h_front_porch = 81;
	pinfo.lcdc.h_pulse_width = 60;
	pinfo.lcdc.v_back_porch = 18;
	pinfo.lcdc.v_front_porch = 27;
	pinfo.lcdc.v_pulse_width = 2;
	pinfo.lcdc.border_clr = 0;	/* blk */
	pinfo.lcdc.underflow_clr = 0xff;	/* blue */
	pinfo.lcdc.hsync_skew = 0;

	ret = lcdc_device_register(&pinfo);
	if (ret)
		printk(KERN_ERR "%s: failed to register device!\n", __func__);

	return ret;
}
예제 #17
0
static struct msm_fb_panel_data *get_panel_info(void)
{
	novatek_panel_data.panel_info.xres = 480;
	novatek_panel_data.panel_info.yres = 854;
	MSM_FB_SINGLE_MODE_PANEL(&novatek_panel_data.panel_info);
	novatek_panel_data.panel_info.bpp = 24;
	novatek_panel_data.panel_info.type = MDDI_PANEL;
	novatek_panel_data.panel_info.wait_cycle = 0;
	novatek_panel_data.panel_info.pdest = DISPLAY_1;
	novatek_panel_data.panel_info.fb_num = 2;
	novatek_panel_data.panel_info.clk_rate = 192000000;
	novatek_panel_data.panel_info.clk_min =  190000000;
	novatek_panel_data.panel_info.clk_max =  200000000;
	novatek_panel_data.panel_info.mddi.vdopkt = MDDI_DEFAULT_PRIM_PIX_ATTR;
	novatek_panel_data.panel_info.lcd.refx100 = 5900;
	novatek_panel_data.panel_info.lcd.v_back_porch = 14;
	novatek_panel_data.panel_info.lcd.v_front_porch = 2;
	novatek_panel_data.panel_info.lcd.v_pulse_width = 0;
	novatek_panel_data.panel_info.lcd.vsync_notifier_period = 0;

	return &novatek_panel_data;
}
예제 #18
0
static int __init lcdc_chimei_lvds_panel_init(void)
{
	int ret;
	struct msm_panel_info *pinfo;
      printk(KERN_INFO "lcdc_chimei_lvds_panel_init---------------begin");

#ifdef CONFIG_FB_MSM_MIPI_PANEL_DETECT
	if (msm_fb_detect_client("lcdc_s7Pro_lvds_wxga"))
		return 0;
#endif

	ret = platform_driver_register(&this_driver);
	if (ret)
		return ret;

	pinfo = &chimei_panel_data.panel_info;
	pinfo->xres = 1280;
	pinfo->yres = 800;
	MSM_FB_SINGLE_MODE_PANEL(pinfo);
	pinfo->type = LCDC_PANEL;
	pinfo->pdest = DISPLAY_1;
	pinfo->wait_cycle = 0;
	pinfo->bpp = 24;
	pinfo->fb_num = 2;
    pinfo->clk_rate = 69300000;//69300000; //71110000;  //48000000;
	pinfo->bl_max = PWM_LEVEL;
	pinfo->bl_min = 1;

	/*
	 * this panel is operated by de,
	 * vsycn and hsync are ignored
	 */
    pinfo->lcdc.h_back_porch  = 96;
    pinfo->lcdc.h_front_porch = 0;
    pinfo->lcdc.h_pulse_width = 64;
    pinfo->lcdc.v_back_porch  = 7;
    pinfo->lcdc.v_front_porch = 0;
    pinfo->lcdc.v_pulse_width = 16;
    pinfo->lcdc.border_clr = 0;
	pinfo->lcdc.underflow_clr = 0x00;//0xff;
	pinfo->lcdc.hsync_skew = 0;
	ret = platform_device_register(&this_device);
	if (ret)
		platform_driver_unregister(&this_driver);
      printk(KERN_INFO "lcdc_chimei_lvds_panel_init---------------end");
   
	ret = misc_register(&usrfs_device);
    if (ret)
    {
        printk(KERN_ERR "HDMI: can't register misc device for minor %d\n", usrfs_device.minor);
        misc_deregister(&usrfs_device);
    }

    ret = misc_register(&LCD_dev);
    if (ret < 0) {
        printk("LCD_dev register error.\n");
        misc_deregister(&LCD_dev);
    }
	if(driver_create_file(&(this_driver.driver), &driver_attr_color_en) < 0) 
	{
       pr_err("failed to create sysfs entry(state): \n");
	}
	return ret;
}