Example #1
0
/* returns the number of bridges attached */
static int exynos_drm_attach_lcd_bridge(struct drm_device *dev,
		struct drm_encoder *encoder)
{
	struct bridge_init bridge;
	int ret;

	if (find_bridge("nxp,ptn3460", &bridge)) {
		ret = ptn3460_init(dev, encoder, bridge.client, bridge.node);
		if (!ret)
			return 1;
	}
	return 0;
}
Example #2
0
/** \brief Set up LCD panel
 * @param  no parameters
 * @return 0 on success otherwise error value
 */
int setup_lcd_panel(void)
{
	u8 lcd_type;
	int status;
	char blockname[33];

	lcd_type = get_lcd_panel_type();
	printk(BIOS_INFO, "LCD: Found panel type %d\n", lcd_type);

	switch (lcd_type) {
	case LCD_PANEL_TYPE_10_INCH:
		strcpy(blockname, "hwinfo10.hex");
		break;
	case LCD_PANEL_TYPE_12_INCH:
		strcpy(blockname, "hwinfo12.hex");
		break;
	case LCD_PANEL_TYPE_15_INCH:
		strcpy(blockname, "hwinfo15.hex");
		break;
	case LCD_PANEL_TYPE_19_INCH:
		strcpy(blockname, "hwinfo19.hex");
		break;
	case LCD_PANEL_TYPE_EDID:
		strcpy(blockname, "hwinfo.hex");
		break;
	default:
		printk(BIOS_ERR, "LCD: No supported panel found.\n");
		return 1;
		break;
	}

	/* Now that we have the panel type, set up the DP2LVDS converter */
	status = ptn3460_init(blockname);
	if (status)
		printk(BIOS_ERR, "LCD: Setup PTN with status 0x%x\n", status);
	else
		printk(BIOS_INFO, "LCD: Setup PTN with status 0x%x\n", status);

	return status;
}