static int fusion3_mtp_panel_power(int enable) { unsigned int lcd_id_det = 2; if (enable) { /* Set and enabale LDO2 1.2V for VDDA_MIPI_DSI0/1_PLL */ pm8921_ldo_set_voltage(LDO_2, LDO_VOLTAGE_1_2V); mi_display_gpio_init(); /* Initial condition */ pmic8921_gpio_set(PM8921_GPIO_PANEL_RESET, 0); pmic8921_gpio_set(PM8921_GPIO_LCD_DCDC_EN, 0); pm8921_ldo_clear_voltage(LDO_23); mdelay(8); /* Enable LVS7 */ pm8921_low_voltage_switch_enable(lvs_7); pm8921_ldo_set_voltage(LDO_23, LDO_VOLTAGE_1_8V); mdelay(10); /* Enable VSP VSN */ pmic8921_gpio_set(PM8921_GPIO_LCD_DCDC_EN, 1); mdelay(8); /* Reset */ pmic8921_gpio_set(PM8921_GPIO_PANEL_RESET, 1); mdelay(3); lcd_id_det = pmic8921_gpio_get(PM8921_GPIO_PANEL_ID); } else { if (!target_cont_splash_screen()) { /* Reset down */ pmic8921_gpio_set(PM8921_GPIO_PANEL_RESET, 0); /* Disable VSP VSN */ pmic8921_gpio_set(PM8921_GPIO_LCD_DCDC_EN, 0); mdelay(8); /* Disable 1V8 */ pm8921_ldo_clear_voltage(LDO_23); } } return 0; }
static int panel_id_detection(void) { unsigned int lcd_id_det = 2; lcd_id_det = pmic8921_gpio_get(PM8921_GPIO_PANEL_ID); return lcd_id_det; }