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;
}
Esempio n. 2
0
void
lister_view_from_tree_view	(GtkTreeView *tree_view)
{
	GtkTreePath *path = NULL;
	GtkTreeIter iter;
	GfmRowData *row_data = NULL;
	GnomeVFSURI *uri = NULL;
	GtkTreeModel *model;
	
	
	g_return_if_fail (tree_view != NULL);
	gtk_tree_view_get_cursor (tree_view, &path, NULL);
	model = gtk_tree_view_get_model (tree_view);
	if (!model) goto done;

	if (!gtk_tree_model_get_iter (model, &iter, path)) goto done;

	gtk_tree_model_get (model, &iter, GFM_COLUMN_DATA, &row_data, -1);
	if (!row_data) goto done;

	uri = gnome_vfs_uri_append_file_name (panels_data[get_panel_id(tree_view)].uri_wdir, row_data->info->name);
	if (!uri) goto done;

	lister_view_uri (uri, row_data->info->mime_type);
	
done:
	if (path)
		gtk_tree_path_free (path);
	if (row_data)
		gfm_row_data_free (row_data);
	if (uri)
		gnome_vfs_uri_unref (uri);
}
static ssize_t lcd_type_show(struct device *dev, struct device_attribute *attr, char *buf)
{
	int panel_id = get_panel_id();

	return sprintf(buf, "INH_%x%x%x",
			(panel_id >> 16) & 0xFF,
			(panel_id >> 8) & 0xFF,
			panel_id  & 0xFF);
}
static ssize_t lcd_MTP_show(struct device *dev, struct device_attribute *attr, char *buf)
{
	int panel_id = get_panel_id();

	((unsigned char*)buf)[0] = (panel_id >> 16) & 0xFF;
	((unsigned char*)buf)[1] = (panel_id >> 8) & 0xFF;
	((unsigned char*)buf)[2] = panel_id & 0xFF;

	printk("ldi mtpdata: %x %x %x\n", buf[0], buf[1], buf[2]);

	return 3;
}
static int mipi_toshiba_lcd_on(struct platform_device *pdev)
{
	struct msm_fb_data_type *mfd;
		
	mfd = platform_get_drvdata(pdev);

	if (!mfd)
		return -ENODEV;
	if (mfd->key != MFD_KEY)
		return -EINVAL;
	if( firsttimeboot== 1)
	{
		firsttimeboot = 0;
		return 0;
	}
	
	lcd_panle_reset();
	
	switch(LcdPanleID)
	{
		case (uint32)LCD_PANEL_4P3_NT35516_AUO_LEAD:
			mipi_dsi_cmds_tx(mfd, &mipi_tx_buf, auo_display_on_cmds,
			ARRAY_SIZE(auo_display_on_cmds));
			printk("\n lead panel initialization ok!");
		break;
		case (uint32)LCD_PANEL_4P3_NT35516_LG_TRULY:
			mipi_dsi_cmds_tx(mfd, &mipi_tx_buf, truly_display_on_cmds,
			ARRAY_SIZE(truly_display_on_cmds));
			printk("\n truly and yushun panel initialization ok!");
		break;
		case (uint32)LCD_PANEL_4P3_NT35516_SHARP_SHARP:
			mipi_dsi_cmds_tx(mfd, &mipi_tx_buf, sharp_display_on_cmds,
			ARRAY_SIZE(sharp_display_on_cmds));
			printk("\n sharp initialization ok!");
			break;
		default:
			printk("\n panel initialization error !");
			get_panel_id();
			break;

	}	

	return 0;
}
unsigned char get_panel_size(void)
{
    panel_id_t *panel_id = get_panel_id();
    return ( panel_id->size );
}
void set_panel_size(unsigned char size)
{
    panel_id_t *panel_id = get_panel_id();
    panel_id->size = size;
}