static int mipi_samsung_oled_hd_off(struct platform_device *pdev) { struct msm_fb_data_type *mfd; // u32 tmp; ENTER_FUNC2(); mfd = platform_get_drvdata(pdev); if (!mfd) return -ENODEV; if (mfd->key != MFD_KEY) return -EINVAL; if (samsung_oled_hd_state.disp_on == true) { // is_sleep = TRUE; samsung_oled_hd_state.disp_initialized = false; samsung_oled_hd_state.disp_on = false; printk("[PANTECH_LCD] power off state (oled_hd panel).... \n"); #ifdef CONFIG_PANTECH_HDMI_PW_CTRL_ON_LCD if (!HDMI_Get_Cable_State()) { hdmi_autodetect_control(HDMI_PW_OFF); HDMI_Schedule_Control(0); } #endif } EXIT_FUNC2(); return 0; }
static int mipi_samsung_oled_off(struct platform_device *pdev) { struct msm_fb_data_type *mfd; u32 tmp; ENTER_FUNC2(); mfd = platform_get_drvdata(pdev); if (!mfd) return -ENODEV; if (mfd->key != MFD_KEY) return -EINVAL; if (samsung_oled_state.disp_on == true) { #if 0 gpio_set_value_cansleep(gpio43, 0); usleep(10); gpio_set_value_cansleep(gpio43, 1); usleep(10); mipi_dsi_sw_reset(); #endif tmp = MIPI_INP(MIPI_DSI_BASE + 0xA8); tmp &= ~(1<<28); MIPI_OUTP(MIPI_DSI_BASE + 0xA8, tmp); wmb(); is_sleep = FALSE; samsung_oled_state.disp_initialized = false; samsung_oled_state.disp_on = false; printk("[PANTECH_LCD] power off state (oled panel).... \n"); #ifdef CONFIG_PANTECH_F_HDMI_PW_CTRL_ON_LCD if (!HDMI_Get_Cable_State()) { hdmi_autodetect_control(HDMI_PW_OFF); HDMI_Schedule_Control(0); } #endif } EXIT_FUNC2(); return 0; }
static int mipi_samsung_oled_on(struct platform_device *pdev) { struct msm_fb_data_type *mfd; ENTER_FUNC2(); mfd = platform_get_drvdata(pdev); if (!mfd) return -ENODEV; if (mfd->key != MFD_KEY) return -EINVAL; if (samsung_oled_state.disp_initialized == false) { is_first = TRUE; samsung_oled_state.disp_initialized = true; usleep(10); gpio_set_value_cansleep(gpio43, 0); usleep(10); gpio_set_value_cansleep(gpio43, 1); // lcd panel reset msleep(10); /* bllp bit initialized ... */ mipi_dsi_cmds_tx(mfd, &samsung_oled_tx_buf, samsung_oled_display_init_cmds, ARRAY_SIZE(samsung_oled_display_init_cmds)); is_sleep = FALSE; printk("[PANTECH_LCD] power on state (oled panel).... \n"); #ifdef CONFIG_PANTECH_F_HDMI_PW_CTRL_ON_LCD hdmi_autodetect_control(HDMI_PW_ON); HDMI_Schedule_Control(1); #endif } samsung_oled_state.disp_on = true; EXIT_FUNC2(); return 0; }
static int mipi_samsung_oled_hd_on(struct platform_device *pdev) { struct msm_fb_data_type *mfd; #if (BOARD_VER > WS10) int noled_det; #endif ENTER_FUNC2(); mfd = platform_get_drvdata(pdev); if (!mfd) return -ENODEV; if (mfd->key != MFD_KEY) return -EINVAL; if (samsung_oled_hd_state.disp_initialized == false) { samsung_oled_hd_state.disp_initialized = true; gpio_set_value_cansleep(gpio43, 0); usleep(10); gpio_set_value_cansleep(gpio43, 1); // lcd panel reset usleep(10); // mdelay(10); // mdelay(1); mipi_dsi_cmds_tx(mfd, &samsung_oled_hd_tx_buf, samsung_oled_hd_display_init_cmds, ARRAY_SIZE(samsung_oled_hd_display_init_cmds)); /* mipi_dsi_cmds_tx(mfd, &samsung_oled_hd_tx_buf, samsung_oled_hd_display_sleepout_cmds, ARRAY_SIZE(samsung_oled_hd_display_sleepout_cmds)); mipi_dsi_cmds_tx(mfd, &samsung_oled_hd_tx_buf, samsung_oled_hd_display_on1_cmds, ARRAY_SIZE(samsung_oled_hd_display_on1_cmds)); */ #if (BOARD_VER > WS10) noled_det = gpio_get_value(OLED_DET); if(noled_det) printk("[PANTECH_LCD] OLED Panel Connector State : Disconnect !!!(%d)\n",noled_det); else printk("[PANTECH_LCD] OLED Panel Connector State : Connect !!!(%d)\n",noled_det); if((!is_read)&(!noled_det)) #else if(!is_read) #endif { mipi_dsi_cmd_bta_sw_trigger(); mipi_samsung_oled_hd_read_id(mfd); mipi_dsi_cmds_tx(mfd, &samsung_oled_hd_tx_buf, samsung_oled_hd_display_gamma_cmds_300, ARRAY_SIZE(samsung_oled_hd_display_gamma_cmds_300)); is_read = TRUE; }else{ mipi_dsi_cmds_tx(mfd, &samsung_oled_hd_tx_buf, samsung_oled_hd_display_gamma_cmds_20, ARRAY_SIZE(samsung_oled_hd_display_gamma_cmds_20)); } mipi_dsi_cmds_tx(mfd, &samsung_oled_hd_tx_buf, samsung_oled_hd_display_on2_cmds, ARRAY_SIZE(samsung_oled_hd_display_on2_cmds)); is_sleep = FALSE; printk("[PANTECH_LCD] power on state (oled_hd panel).... \n"); #ifdef D_SKY_OLED_TEMP is_oled_temp_check(); #endif samsung_oled_hd_state.disp_on = true; #ifdef CONFIG_PANTECH_HDMI_PW_CTRL_ON_LCD hdmi_autodetect_control(HDMI_PW_ON); HDMI_Schedule_Control(1); #endif } EXIT_FUNC2(); return 0; }