Exemple #1
0
static int mipi_lgit_lcd_probe(struct platform_device *pdev)
{
	int rc;

	if (pdev->id == 0) {
		mipi_lgit_pdata = pdev->dev.platform_data;
		return 0;
	}

	// make a copy of platform data
	memcpy((void*)faux123_power_on_set_1, (void*)mipi_lgit_pdata->power_on_set_1, 
		sizeof(faux123_power_on_set_1));

	pr_info("%s start\n", __func__);

	skip_init = true;
	msm_fb_add_device(pdev);

	register_syscore_ops(&panel_syscore_ops);
	rc = device_create_file(&pdev->dev, &dev_attr_kgamma_r);
	if(rc !=0)
		return -1;
	rc = device_create_file(&pdev->dev, &dev_attr_kgamma_g);
	if(rc !=0)
		return -1;
	rc = device_create_file(&pdev->dev, &dev_attr_kgamma_b);
	if(rc !=0)
		return -1;
	rc = device_create_file(&pdev->dev, &dev_attr_kgamma_ctrl);
	if(rc !=0)
		return -1;

	return 0;
}
static int __devinit lvds_frc_probe(struct platform_device *pdev)
{
	int rc = 0;

	if (pdev->id == 0) {
		frc_pdata = pdev->dev.platform_data;
		if (frc_pdata != NULL) {
			gpio_update = frc_pdata->gpio[0];
			gpio_reset = frc_pdata->gpio[1];
			gpio_pwr = frc_pdata->gpio[2];
			pr_info("%s: power=%d update=%d reset=%d\n",
				__func__, gpio_pwr, gpio_update, gpio_reset);
		}
		return 0;
	}

	frc_fbpdev = msm_fb_add_device(pdev);
	if (!frc_fbpdev) {
		dev_err(&pdev->dev, "failed to add msm_fb device\n");
		rc = -ENODEV;
		goto probe_exit;
	}

probe_exit:
	return rc;
}
static int __devinit mipi_hx8389b_lcd_probe(struct platform_device *pdev)
{
	struct platform_device *pthisdev = NULL;
	pr_debug("%s\n", __func__);

	if (pdev->id == 0) {
		mipi_hx8389b_pdata = pdev->dev.platform_data;
		if (mipi_hx8389b_pdata->bl_lock)
			spin_lock_init(&mipi_hx8389b_pdata->bl_spinlock);

                /* SKUD use PWM as backlight control method */
                if(machine_is_msm8625q_skud() || machine_is_msm8625q_evbd()) {
                        mipi_hx8389b_bl_ctrl = 1;
                }

		return 0;
	}
#if DRV_READ_LCDID_MISC_IOCTL
		msleep(2);
		lcd_id_flag = tyq_lcd_read_id(LCD_ID);
		printk(KERN_ERR "--TY--lcd:truly_probe id=%d(0:byd 1:truly)\n",lcd_id_flag);
		truly_misc_data = pdev;
		misc_register(&truly_device);
#endif

	pthisdev = msm_fb_add_device(pdev);
	mipi_hx8389b_create_sysfs(pthisdev);

	return 0;
}
static int mipi_lgit_lcd_probe(struct platform_device *pdev)
{
	int ret;

	if (pdev->id == 0) {
		mipi_lgit_pdata = pdev->dev.platform_data;
		return 0;
	}

	pr_info("%s start\n", __func__);

	skip_init = true;
	msm_fb_add_device(pdev);

	register_syscore_ops(&panel_syscore_ops);

	ret = misc_register(&gamma_control_device);
	if (ret) {
		pr_err("%s misc register(%s)\n", __func__,
					gamma_control_device.name);
		return 1;
	}

	if (sysfs_create_group(&gamma_control_device.this_device->kobj,
						&gamma_control_group) < 0) {
		pr_err("%s sysfs_create_group fail\n", __func__);
		pr_err("Failed to create sysfs group for device (%s)!\n",
						gamma_control_device.name);
	}

	return 0;
}
Exemple #5
0
static int __devinit mipi_orise_lcd_probe(struct platform_device *pdev)
{
	struct msm_fb_data_type *mfd;
	struct mipi_panel_info *mipi;
	struct platform_device *current_pdev;
	static struct mipi_dsi_phy_ctrl *phy_settings;

	if (pdev->id == 0) {
		mipi_orise_pdata = pdev->dev.platform_data;

		if (mipi_orise_pdata
			&& mipi_orise_pdata->phy_ctrl_settings) {
			phy_settings = (mipi_orise_pdata->phy_ctrl_settings);
		}

		return 0;
	}

	current_pdev = msm_fb_add_device(pdev);

	if (current_pdev) {
		mfd = platform_get_drvdata(current_pdev);
		if (!mfd)
			return -ENODEV;
		if (mfd->key != MFD_KEY)
			return -EINVAL;

		mipi  = &mfd->panel_info.mipi;

		if (phy_settings != NULL)
			mipi->dsi_phy_db = phy_settings;
	}
	return 0;
}
static int __init tovis_qvga_probe(struct platform_device *pdev)
{
	int ret;
	int	readport;

	if (pdev->id == 0) {
		tovis_qvga_panel_pdata = pdev->dev.platform_data;
		return 0;
	}

	msm_fb_add_device(pdev);

	ret = device_create_file(&pdev->dev, &dev_attr_lcd_onoff);
	if (ret) {
		printk("tovis_qvga_probe device_creat_file failed!!!\n");
	}

	
	gpio_tlmm_config(GPIO_CFG(GPIO_LCD_TID, 0, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_2MA), GPIO_CFG_ENABLE);
	readport = gpio_get_value(GPIO_LCD_TID);

	printk("Read GPIO LCD port %d \n", readport);
	
#ifndef CONFIG_ARCH_MSM7X27A
	tovis_pm_qos_req = pm_qos_add_request(PM_QOS_SYSTEM_BUS_FREQ, PM_QOS_DEFAULT_VALUE);
#endif
	return 0;
}
Exemple #7
0
static int __init lcdc_panel_probe(struct platform_device *pdev)
{
    fih_printk(debug_mask_lcm, FIH_LCM_DBG, KERN_INFO "lcm_innolux: lcdc_panel_probe()\n");
	msm_fb_add_device(pdev);

	return 0;
}
static int mipi_lgit_lcd_probe(struct platform_device *pdev)
{
#if defined(CONFIG_LGE_R63311_COLOR_ENGINE)
    int err;
#endif
    int err;

	if (pdev->id == 0) {
		mipi_lgit_pdata = pdev->dev.platform_data;
		return 0;
	}

	printk(KERN_INFO "[LCD][DEBUG] %s: mipi lgit lcd probe start\n", __func__);

	msm_fb_add_device(pdev);

#if defined(CONFIG_LGIT_COLOR_ENGINE_SWITCH)
	err = device_create_file(&pdev->dev, &dev_attr_color_engine_on_off);
	if(err < 0)
		printk("[LCD][DEBUG] %s : Cannot create the sysfs\n" , __func__);
#endif //CONFIG_LGIT_COLOR_ENGINE_SWITCH

#if defined(CONFIG_LGE_BACKLIGHT_CABC)
	err = device_create_file(&pdev->dev, &dev_attr_cabc_off);
	if(err < 0)
		printk("[LCD][DEBUG] %s : Cannot create the sysfs\n" , __func__);
#endif

	return 0;
}
static int __devinit mipi_ville_lcd_probe(struct platform_device *pdev)
{
	printk(KERN_ERR "%s: probe ++ %d\n", __func__, panel_type);
	if (panel_type == PANEL_ID_VILLE_SAMSUNG_SG ||
			panel_type == PANEL_ID_VILLE_SAMSUNG_SG_C2) {
		display_off_cmds = ville_display_off_cmds;
		display_off_cmds_count = ARRAY_SIZE(ville_display_off_cmds);
		if (panel_type == PANEL_ID_VILLE_SAMSUNG_SG) {
			cmd_on_cmds = ville_cmd_on_cmds;
			cmd_on_cmds_count = ARRAY_SIZE(ville_cmd_on_cmds);
		} else {
			cmd_on_cmds = ville_cmd_on_cmds_c2;
			cmd_on_cmds_count = ARRAY_SIZE(ville_cmd_on_cmds_c2);
		}
	} else if (panel_type == PANEL_ID_VILLE_AUO) {
		display_off_cmds = auo_display_off_cmds;
		display_off_cmds_count = ARRAY_SIZE(auo_display_off_cmds);
		cmd_on_cmds = auo_cmd_on_cmds;
		cmd_on_cmds_count = ARRAY_SIZE(auo_cmd_on_cmds);
	}

	if (pdev->id == 0) {
		mipi_ville_pdata = pdev->dev.platform_data;
		return 0;
	}
	msm_fb_add_device(pdev);
	return 0;
}
Exemple #10
0
static int mipi_lgit_lcd_probe(struct platform_device *pdev)
{
    int rc;

    if (pdev->id == 0) {
        mipi_lgit_pdata = pdev->dev.platform_data;
        return 0;
    }

    // make a copy of platform data
    memcpy((void*)faux123_power_on_set_1, (void*)mipi_lgit_pdata->power_on_set_1,
           sizeof(faux123_power_on_set_1));

    printk(KERN_INFO "%s: mipi lgit lcd probe start\n", __func__);

    msm_fb_add_device(pdev);

    rc = device_create_file(&pdev->dev, &dev_attr_kgamma_r);
    if(rc !=0)
        return -1;
    rc = device_create_file(&pdev->dev, &dev_attr_kgamma_g);
    if(rc !=0)
        return -1;
    rc = device_create_file(&pdev->dev, &dev_attr_kgamma_b);
    if(rc !=0)
        return -1;
    rc = device_create_file(&pdev->dev, &dev_attr_kgamma_ctrl);
    if(rc !=0)
        return -1;

    return 0;
}
static int __devinit mipi_toshiba_lcd_probe(struct platform_device *pdev)
{                    
	if (pdev->id == 0) {
		mipi_toshiba_pdata = pdev->dev.platform_data;
		return 0;
	}

	if (mipi_toshiba_pdata == NULL) {
		pr_err("%s.invalid platform data.\n", __func__);
		return -ENODEV;
	}

	if (mipi_toshiba_pdata != NULL)
		bl_lpm = 12; //mipi_toshiba_pdata->gpio[0];  
	//gpio_request(bl_lpm,"backlight");
	if( LcdPanleID==LCD_PANEL_NOPANEL)
	{
		printk("\n could not get panel id from boot !");
		get_panel_id();
	}
	
	msm_fb_add_device(pdev);

	return 0;
}
Exemple #12
0
static int __devinit mipi_sharp_video_lcd_probe(struct platform_device *pdev)
{
    struct mipi_dsi_panel_platform_data *platform_data;
    struct msm_fb_panel_data            *pdata;
    struct msm_panel_info               *pinfo;

    static u32 width, height;

    if (pdev->id == 0) {
        platform_data = pdev->dev.platform_data;

        if (platform_data) {
            width  = (platform_data->width_in_mm);
            height = (platform_data->height_in_mm);
        }

        return 0;
    }

    pdata = (struct msm_fb_panel_data *)pdev->dev.platform_data;
    pinfo = &(pdata->panel_info);

    pinfo->width_in_mm  = width;
    pinfo->height_in_mm = height;

    msm_fb_add_device(pdev);

    return 0;
}
Exemple #13
0
static int __devinit mipi_smd_oled_hd_lcd_probe(struct platform_device *pdev)
{
    int cnt;

    if (pdev->id == 0)
    {
        mipi_smd_oled_hd_pdata = pdev->dev.platform_data;
        return 0;
    }

    msm_fb_add_device(pdev);


    mipi_smd_oled_hd_read_hw_rev();
    if (hw_rev == MIPI_SMD_OLED_HD_HW_REV_NEW)
    {
        for( cnt = 0; cnt < 39; cnt++)
        {
            panel_control[cnt] = panel_control_new[cnt];
        }
        for( cnt = 0; cnt < 26; cnt++)
        {
            default_gamma_condition_300[cnt] = default_gamma_condition_300_new[cnt];
        }
    }

    return 0;
}
static int mipi_himax_lcd_probe(struct platform_device *pdev)
{
#if defined CONFIG_FB_MSM_SELF_REFRESH
	int ret;
#endif
	if (pdev->id == 0) {
		mipi_himax_pdata = pdev->dev.platform_data;
		mutex_init(&cmdlock);
#if defined CONFIG_FB_MSM_SELF_REFRESH
		ret = setup_vsync(pdev, 1);
		if (ret) {
			dev_err(&pdev->dev, "mipi_himax_setup_vsync failed\n");
			return ret;
		}
		wake_lock_init(&himax_idle_wake_lock, WAKE_LOCK_IDLE, "himax_idle_lock");
#ifdef CONFIG_PERFLOCK
		perf_lock_init(&himax_perf_lock, PERF_LOCK_HIGHEST, "himax");
#endif
#endif
		return 0;
	}

	msm_fb_add_device(pdev);

	return 0;
}
static int __devinit mipi_sony_lcd_probe(struct platform_device *pdev)
{
	struct msm_fb_data_type *mfd;
	struct mipi_panel_info *mipi;
	struct platform_device *current_pdev;

	if (pdev->id == 0) {
		mipi_sony_pdata = pdev->dev.platform_data;
		return 0;
	}

	mutex_init(&sony_mutex);

	current_pdev = msm_fb_add_device(pdev);

	if (current_pdev) {
		mfd = platform_get_drvdata(current_pdev);
		if (!mfd)
			return -ENODEV;
		if (mfd->key != MFD_KEY)
			return -EINVAL;

		mipi  = &mfd->panel_info.mipi;
	}

	return 0;
}
static int __devinit mipi_toshiba_lcd_probe(struct platform_device *pdev)
{
	if (pdev->id == 0) {
		mipi_toshiba_pdata = pdev->dev.platform_data;
		return 0;
	}

	if (mipi_toshiba_pdata == NULL) {
		pr_err("%s.invalid platform data.\n", __func__);
		return -ENODEV;
	}

	if (mipi_toshiba_pdata != NULL)
		bl_lpm = pwm_request(mipi_toshiba_pdata->gpio[0],
			"backlight");

	if (bl_lpm == NULL || IS_ERR(bl_lpm)) {
		pr_err("%s pwm_request() failed\n", __func__);
		bl_lpm = NULL;
	}
	pr_debug("bl_lpm = %p lpm = %d\n", bl_lpm,
		mipi_toshiba_pdata->gpio[0]);

	msm_fb_add_device(pdev);

	return 0;
}
Exemple #17
0
static int __devinit lvds_chimei_probe(struct platform_device *pdev)
{
	int rc = 0;

	if (pdev->id == 0) {
		cm_pdata = pdev->dev.platform_data;
		if (cm_pdata == NULL)
			pr_err("%s: no PWM gpio specified\n", __func__);
		return 0;
	}

	if (cm_pdata != NULL)
		bl_lpm = pwm_request(cm_pdata->gpio[0],
			"backlight");

	if (bl_lpm == NULL || IS_ERR(bl_lpm)) {
		pr_err("%s pwm_request() failed\n", __func__);
		bl_lpm = NULL;
	}
	pr_debug("bl_lpm = %p lpm = %d\n", bl_lpm,
		cm_pdata->gpio[0]);

	cm_fbpdev = msm_fb_add_device(pdev);
	if (!cm_fbpdev) {
		dev_err(&pdev->dev, "failed to add msm_fb device\n");
		rc = -ENODEV;
		goto probe_exit;
	}

probe_exit:
	return rc;
}
static int __init lcdc_hx8357b_probe(struct platform_device *pdev)
{
    if (pdev->id == 0) {
        lcdc_hx8357b_pdata = pdev->dev.platform_data;
        return 0;
    }msm_fb_add_device(pdev);
    return 0;
}
Exemple #19
0
static int __devinit nt35582_probe(struct platform_device *pdev)
{
    msm_fb_add_device(pdev);
    /* < BU5D10320 lijianzhao 20100521 begin */
    /* delete some lines */
    /* BU5D10320 lijianzhao 20100521 end > */
    return 0;
}
Exemple #20
0
static int __devinit ili9325sim_probe(struct platform_device *pdev)
{	
	if (pdev->id == 0) {
		lcdc_ili9325sim_pdata = pdev->dev.platform_data;
		return 0;
	}
	msm_fb_add_device(pdev);
	return 0;
}
static int __devinit nt35410_hvga_probe(struct platform_device *pdev)
{
    if (pdev->id == 0) {
        lcdc_nt35410_hvga_pdata = pdev->dev.platform_data;
        return 0;
    }
    msm_fb_add_device(pdev);
    return 0;
}
static int __init lcd_ili9331b_probe(struct platform_device *pdev)
{
	if (0 == pdev->id) {
		lcd_ili9331b_pdata = pdev->dev.platform_data;
		return 0;
	}
	msm_fb_add_device(pdev);
	return 0;
}
static int mddi_sony_lcd_probe(struct platform_device *pdev)
{
	int ret = -ENODEV;
	struct msm_fb_panel_data *panel_data;

	dev_dbg(&pdev->dev, "probing\n");

	panel_ext = pdev->dev.platform_data;
	if (panel_ext == NULL)
		return -EINVAL;

	MDDI_DEBUG(LEVEL_TRACE, "%s [%d]\n", __func__, lcd_state);
	if (!pdev) {
		MDDI_ERROR("Display failed in probe\n");
		ret = -ENODEV;
		goto exit_point;
	}
	if (!pdev->dev.platform_data) {
		MDDI_ERROR("Display failed in probe, no platform data\n");
		ret = -ENODEV;
		goto exit_point;
	}

	panel_data = &sony_hvga_panel_data;
	/*platform_set_drvdata(pdev, panel_data);*/


	if (!check_panel_ids()) {
		MDDI_DEBUG(LEVEL_TRACE, "%s Found display with cell ID = 0x%x, "
				"module ID = 0x%x, revision ID = 0x%x, "
				"driver IC ID = 0x%x, driver ID = 0x%x\n",
				DBG_STR, panel_ids.cell_id & 0xFF,
				panel_ids.module_id & 0xFF,
				panel_ids.revision_id & 0xFF,
				panel_ids.driver_ic_id & 0xFF,
				MDDI_DRIVER_VERSION);

		lcd_state = LCD_STATE_POWER_ON;
		power_ctrl = POWER_ON;

		panel_data->on  = mddi_sony_lcd_on;
		panel_data->off = mddi_sony_lcd_off;
		panel_ext->window_adjust =
						sony_lcd_window_adjust;

		pdev->dev.platform_data = &sony_hvga_panel_data;
		/* adds mfd on driver_data */
		msm_fb_add_device(pdev);

		/* Add SYSFS to module */
		lcd_attribute_register(pdev);

		ret = 0;
	}
exit_point:
	return ret;
}
Exemple #24
0
static int __init samsung_probe(struct platform_device *pdev)
{
	int rc = 0;
	struct msm_fb_data_type *mfd;

	if (pdev->id == 0) {
		dd = kzalloc(sizeof *dd, GFP_KERNEL);
		if (!dd)
			return -ENOMEM;
		dd->vga_enabled = 0;
		dd->pdata = pdev->dev.platform_data;
		return 0;
	} else if (!dd)
		return -ENODEV;

#ifdef CONFIG_PMIC8058_PWM
	bl_pwm0 = pwm_request(dd->pdata->gpio_num[0], "backlight1");
	if (bl_pwm0 == NULL || IS_ERR(bl_pwm0)) {
		pr_err("%s pwm_request() failed\n", __func__);
		bl_pwm0 = NULL;
	}

	bl_pwm1 = pwm_request(dd->pdata->gpio_num[1], "backlight2");
	if (bl_pwm1 == NULL || IS_ERR(bl_pwm1)) {
		pr_err("%s pwm_request() failed\n", __func__);
		bl_pwm1 = NULL;
	}

	printk(KERN_INFO "samsung_probe: bl_pwm0=%p LPG_chan0=%d "
			"bl_pwm1=%p LPG_chan1=%d\n",
			bl_pwm0, (int)dd->pdata->gpio_num[0],
			bl_pwm1, (int)dd->pdata->gpio_num[1]
			);
#endif


	dd->fbpdev = msm_fb_add_device(pdev);
	if (!dd->fbpdev) {
		dev_err(&pdev->dev, "failed to add msm_fb device\n");
		rc = -ENODEV;
		goto probe_exit;
	}

	mfd = platform_get_drvdata(dd->fbpdev);
	if (mfd && mfd->fbi && mfd->fbi->dev) {
		rc = sysfs_create_group(&mfd->fbi->dev->kobj, &attr_group);
		if (rc)
			dev_err(&pdev->dev, "failed to create sysfs group\n");
	} else {
		dev_err(&pdev->dev, "no dev to create sysfs group\n");
		rc = -ENODEV;
	}

probe_exit:
	return rc;
}
Exemple #25
0
static int __devinit mipi_ili9486_hsd_djn375_lcd_probe(struct platform_device *pdev)
{
	int ret;
	pr_debug("%s\n", __func__);
	gpio_tlmm_config(GPIO_CFG(GPIO_BACKLIGHT_EN, 0, GPIO_CFG_OUTPUT, GPIO_CFG_PULL_DOWN, GPIO_CFG_16MA),GPIO_CFG_ENABLE);
	ret = ili9486_power_init();
	msm_fb_add_device(pdev);

	return 0;
}
Exemple #26
0
static int __devinit common_pt_probe(struct platform_device *pdev)
{
      if (pdev->id == 0) {
            lcdc_common_pt_pdata = pdev->dev.platform_data;
            common_spi_init();
            return 0;
      }
      msm_fb_add_device(pdev);
      return 0;
}
Exemple #27
0
static int __init mddi_tpo_nv_probe(struct platform_device *pdev)
{
    extern void lmxxxx_set_pwm (unsigned en_dis);

    msm_fb_add_device(pdev);

    lmxxxx_set_pwm(0); // Tell backlight ctlr to ignore PWM input from CABC (BZ 51720)

    return 0;
}
static int __devinit lcdc_panel_probe(struct platform_device *pdev)
{

	struct msm_panel_info *pinfo;
	int ret;

	if(pdev->id == 0) {     
		lcdc_tft_pdata = pdev->dev.platform_data;
		lcdc_tft_pdata->panel_config_gpio(1);   

		g_lcd_panel_type = lcd_panel_detect(); //temporary
		if(g_lcd_panel_type==LCD_PANEL_LEAD_WVGA)
		{
			pinfo = &lcdc_tft_panel_data.panel_info;
			pinfo->lcdc.h_back_porch = 10;
			pinfo->lcdc.h_front_porch = 8;
			pinfo->lcdc.h_pulse_width = 10;
			pinfo->lcdc.v_back_porch = 2;
			pinfo->lcdc.v_front_porch = 2;
			pinfo->lcdc.v_pulse_width = 2;
			pinfo->lcdc.border_clr = 0;	/* blk */
			pinfo->lcdc.underflow_clr = 0xff;	/* blue */
			pinfo->lcdc.hsync_skew = 0;
			LcdPanleID= 72;
		}
		else
		{
			pinfo = &lcdc_tft_panel_data.panel_info;
			pinfo->lcdc.h_back_porch = 8;
			pinfo->lcdc.h_front_porch = 8;
			pinfo->lcdc.h_pulse_width = 2;
			pinfo->lcdc.v_back_porch = 8;
			pinfo->lcdc.v_front_porch = 8;
			pinfo->lcdc.v_pulse_width = 2;
			pinfo->lcdc.border_clr = 0;	/* blk */
			pinfo->lcdc.underflow_clr = 0xffff;	/* blue */
			pinfo->lcdc.hsync_skew = 0;
			LcdPanleID=70;
		}
		pinfo->xres = 480;
		pinfo->yres = 800;		
		pinfo->type = LCDC_PANEL;
		pinfo->pdest = DISPLAY_1;
		pinfo->wait_cycle = 0;
		pinfo->bpp = 18;
		pinfo->fb_num = 2;
		pinfo->clk_rate = 24576000;
    	ret = platform_device_register(&this_device);		
		return 0;
	 	
	}
	msm_fb_add_device(pdev);

	return 0;
}
Exemple #29
0
static int __devinit mipi_toshiba_lcd_probe(struct platform_device *pdev)
{
	if (pdev->id == 0) {
		mipi_toshiba_pdata = pdev->dev.platform_data;
		return 0;
	}

	msm_fb_add_device(pdev);

	return 0;
}
static int __devinit mipi_renesas_lcd_probe(struct platform_device *pdev)
{
    if (pdev->id == 0) {
        mipi_renesas_pdata = pdev->dev.platform_data;
		return 0;
	}
	mutex_init(&renesas_state.lcd_mutex);
	msm_fb_add_device(pdev);

	return 0;
}