static void rk610_hdmi_early_suspend(struct early_suspend *h) { struct rk610_hdmi_inf *rk610_hdmi = container_of(h, struct rk610_hdmi_inf, early_suspend); printk( "rk610_hdmi enter early suspend\n"); hdmi_suspend(rk610_hdmi->hdmi); Rk610_hdmi_suspend(rk610_hdmi->client); return; }
// TODO: this is a temp debug solution //extern void hdmi_cable_fake_plug_in(void); //extern int hdmi_drv_init(void); static void process_dbg_opt(const char *opt) { if (0 == strncmp(opt, "on", 2)) { hdmi_power_on(); } else if (0 == strncmp(opt, "off", 3)) { hdmi_power_off(); } else if(0 == strncmp(opt, "suspend", 7)) { hdmi_suspend(); } else if(0 == strncmp(opt, "resume", 6)) { hdmi_resume(); } else if(0 == strncmp(opt, "colorbar", 8)) { } else if(0 == strncmp(opt, "ldooff", 6)) { } else if (0 == strncmp(opt, "log:", 3)) { if (0 == strncmp(opt + 9, "on", 2)) { hdmi_log_enable(true); } else if (0 == strncmp(opt + 9, "off", 3)) { hdmi_log_enable(false); } else { goto Error; } } else { goto Error; } return; Error: printk("[hdmitx] parse command error!\n\n%s", STR_HELP); }
// TODO: this is a temp debug solution static void process_dbg_opt(const char *opt) { if (0) { } else if (0 == strncmp(opt, "on", 2)) { hdmi_power_on(); } else if (0 == strncmp(opt, "off", 3)) { hdmi_power_off(); } else if (0 == strncmp(opt, "suspend", 7)) { hdmi_suspend(); } else if (0 == strncmp(opt, "resume", 6)) { hdmi_resume(); } else if (0 == strncmp(opt, "colorbar", 8)) { } else if (0 == strncmp(opt, "ldooff", 6)) { } else if (0 == strncmp(opt, "log:", 4)) { if (0 == strncmp(opt + 4, "on", 2)) { hdmi_log_enable(true); } else if (0 == strncmp(opt + 4, "off", 3)) { hdmi_log_enable(false); } else { goto Error; } } else if (0 == strncmp(opt, "fakecablein:", 12)) { if (0 == strncmp(opt + 12, "enable", 6)) { hdmi_cable_fake_plug_in(); } else if (0 == strncmp(opt + 12, "disable", 7)) { hdmi_cable_fake_plug_out(); } else { goto Error; } } else if (0 == strncmp(opt, "hdmimmp:", 8)) { if (0 == strncmp(opt + 8, "on", 2)) { hdmi_mmp_enable(1); } else if (0 == strncmp(opt + 8, "off", 3)) { hdmi_mmp_enable(0); } else if (0 == strncmp(opt + 8, "img", 3)) { hdmi_mmp_enable(7); } else { goto Error; } } else if (0 == strncmp(opt, "hdmireg", 7)) { ext_disp_diagnose(); } else if (0 == strncmp(opt, "enablehwc:", 10)) { if (0 == strncmp(opt + 10, "on", 2)) { hdmi_hwc_enable(1); } else if (0 == strncmp(opt + 10, "off", 3)) { hdmi_hwc_enable(0); } } else if (0 == strncmp(opt, "I2S1:", 5)) { #ifdef GPIO_MHL_I2S_OUT_WS_PIN if (0 == strncmp(opt + 5, "on", 2)) { printk("[hdmi][Debug] Enable I2S1 \n"); mt_set_gpio_mode(GPIO_MHL_I2S_OUT_WS_PIN, GPIO_MODE_01); mt_set_gpio_mode(GPIO_MHL_I2S_OUT_CK_PIN, GPIO_MODE_01); mt_set_gpio_mode(GPIO_MHL_I2S_OUT_DAT_PIN, GPIO_MODE_01); } else if (0 == strncmp(opt + 5, "off", 3)) { printk("[hdmi][Debug] Disable I2S1 \n"); mt_set_gpio_mode(GPIO_MHL_I2S_OUT_WS_PIN, GPIO_MODE_02); mt_set_gpio_mode(GPIO_MHL_I2S_OUT_CK_PIN, GPIO_MODE_01); mt_set_gpio_mode(GPIO_MHL_I2S_OUT_DAT_PIN, GPIO_MODE_02); } #endif } else if (0 == strncmp(opt, "I2SEnable:", 10)) { if (0 == strncmp(opt + 10, "1", 1)) { I2S_Enable = 1; } else if (0 == strncmp(opt + 10, "0", 1)) { I2S_Enable = 0; } } else if (0 == strncmp(opt, "DPI_IO_DRIVING:", 15)) { if (0 == strncmp(opt + 15, "4", 1)) { MASKREG32(DISPSYS_IO_DRIVING, 0x3C00, 0x0000); } else if (0 == strncmp(opt + 15, "8", 1)) { MASKREG32(DISPSYS_IO_DRIVING, 0x3C00, 0x1400); } else if (0 == strncmp(opt + 15, "12", 2)) { MASKREG32(DISPSYS_IO_DRIVING, 0x3C00, 0x2800); } else if (0 == strncmp(opt + 15, "16", 2)) { MASKREG32(DISPSYS_IO_DRIVING, 0x3C00, 0x3C00); } } else if (0 == strncmp(opt, "DPI_DUMP:", 9)) { if (ddp_modules_driver[DISP_MODULE_DPI]->dump_info != NULL) { ddp_modules_driver[DISP_MODULE_DPI]->dump_info(DISP_MODULE_DPI, 1); } } else if (0 == strncmp(opt, "forceon", 7)) { hdmi_force_on(false); } else { goto Error; } return; Error: printk("[hdmitx] parse command error!\n\n%s", STR_HELP); }
// TODO: this is a temp debug solution //extern void hdmi_cable_fake_plug_in(void); //extern int hdmi_drv_init(void); static void process_dbg_opt(const char *opt) { if (0) { } #if defined(CONFIG_MTK_HDMI_SUPPORT) else if (0 == strncmp(opt, "on", 2)) { hdmi_power_on(); } else if (0 == strncmp(opt, "off", 3)) { hdmi_power_off(); } else if (0 == strncmp(opt, "suspend", 7)) { hdmi_suspend(); } else if (0 == strncmp(opt, "resume", 6)) { hdmi_resume(); } else if (0 == strncmp(opt, "colorbar", 8)) { } else if (0 == strncmp(opt, "ldooff", 6)) { } else if (0 == strncmp(opt, "log:", 4)) { if (0 == strncmp(opt + 4, "on", 2)) { hdmi_log_enable(true); } else if (0 == strncmp(opt + 4, "off", 3)) { hdmi_log_enable(false); } else { goto Error; } } else if (0 == strncmp(opt, "fakecablein:", 12)) { if (0 == strncmp(opt + 12, "enable", 6)) { hdmi_cable_fake_plug_in(); } else if (0 == strncmp(opt + 12, "disable", 7)) { hdmi_cable_fake_plug_out(); } else { goto Error; } } else if (0 == strncmp(opt, "force_res:", 10)) { char *p = (char *)opt + 10; unsigned int res = (unsigned int) simple_strtoul(p, &p, 16); hdmi_force_resolution(res); } #endif else if (0 == strncmp(opt, "hdmimmp:", 8)) { if (0 == strncmp(opt + 8, "on", 2)) { hdmi_mmp_enable(1); } else if (0 == strncmp(opt + 8, "off", 3)) { hdmi_mmp_enable(0); } else if (0 == strncmp(opt + 8, "img", 3)) { hdmi_mmp_enable(7); } else { goto Error; } } else if (0 == strncmp(opt, "hdmireg", 7)) { ext_disp_diagnose(); } else if (0 == strncmp(opt, "enablehwc:", 10)) { if (0 == strncmp(opt + 10, "on", 2)) { hdmi_hwc_enable(1); } else if (0 == strncmp(opt + 10, "off", 3)) { hdmi_hwc_enable(0); } } else { goto Error; } return; Error: printk("[hdmitx] parse command error!\n\n%s", STR_HELP); }
int suspend_nxp_hdmi(struct nxp_hdmi *me) { return hdmi_suspend(&me->ctx); }
// TODO: this is a temp debug solution //extern void hdmi_cable_fake_plug_in(void); //extern int hdmi_drv_init(void); static void process_dbg_opt(const char *opt) { if(0) { } #if defined(MTK_HDMI_SUPPORT) else if (0 == strncmp(opt, "on", 2)) { hdmi_power_on(); } else if (0 == strncmp(opt, "off", 3)) { hdmi_power_off(); } else if(0 == strncmp(opt, "suspend", 7)) { hdmi_suspend(); } else if(0 == strncmp(opt, "resume", 6)) { hdmi_resume(); } else if(0 == strncmp(opt, "colorbar", 8)) { } else if(0 == strncmp(opt, "ldooff", 6)) { } else if (0 == strncmp(opt, "log:", 4)) { if (0 == strncmp(opt + 4, "on", 2)) { hdmi_log_enable(true); } else if (0 == strncmp(opt + 4, "off", 3)) { hdmi_log_enable(false); } else { goto Error; } } else if(0 == strncmp(opt, "fakecablein:", 12)) { if (0 == strncmp(opt + 12, "enable", 6)) { hdmi_cable_fake_plug_in( ); } else if (0 == strncmp(opt + 12, "disable", 7)) { hdmi_cable_fake_plug_out( ); } else { goto Error; } } #endif else { goto Error; } return; Error: printk("[hdmitx] parse command error!\n\n%s", STR_HELP); }
// TODO: this is a temp debug solution //extern void hdmi_cable_fake_plug_in(void); //extern int hdmi_drv_init(void); static void process_dbg_opt(const char *opt) { if (0) { } #if defined(MTK_HDMI_SUPPORT) else if (0 == strncmp(opt, "on", 2)) { hdmi_power_on(); } else if (0 == strncmp(opt, "off", 3)) { hdmi_power_off(); } else if (0 == strncmp(opt, "suspend", 7)) { hdmi_suspend(); } else if (0 == strncmp(opt, "resume", 6)) { hdmi_resume(); } else if (0 == strncmp(opt, "colorbar", 8)) { } else if (0 == strncmp(opt, "ldooff", 6)) { } else if (0 == strncmp(opt, "log:", 4)) { if (0 == strncmp(opt + 4, "on", 2)) { hdmi_log_enable(true); } else if (0 == strncmp(opt + 4, "off", 3)) { hdmi_log_enable(false); } else { goto Error; } } else if (0 == strncmp(opt, "fakecablein:", 12)) { if (0 == strncmp(opt + 12, "enable", 6)) { hdmi_cable_fake_plug_in(); } else if (0 == strncmp(opt + 12, "disable", 7)) { hdmi_cable_fake_plug_out(); } else { goto Error; } } #endif else if (0 == strncmp(opt, "hdmimmp:", 8)) { if (0 == strncmp(opt + 8, "on", 2)) { hdmi_mmp_enable(1); } else if (0 == strncmp(opt + 8, "off", 3)) { hdmi_mmp_enable(0); } else if (0 == strncmp(opt + 8, "img", 3)) { hdmi_mmp_enable(7); } else if (0 == strncmp(opt + 8, "init", 4)) { init_hdmi_mmp_events(); } else { goto Error; } } else if (0 == strncmp(opt, "imgscale:", 9)) { char *p = (char *)opt + 9; unsigned int level = (unsigned int) simple_strtoul(p, &p, 3); if (level) { if (level > 10) { level = 10; } if (level < 1) { level = 1; } mmp_image_scale = level; printk("[hdmitx] imgscale set to %d\n", mmp_image_scale); } else { goto Error; } } else { goto Error; } return; Error: printk("[hdmitx] parse command error!\n\n%s", STR_HELP); }