static int spade_sharp_panel_shutdown(struct msm_lcdc_panel_ops *ops) { lcm_sharp_write_seq(sharp_uninit_seq, ARRAY_SIZE(sharp_uninit_seq)); spade_sharp_panel_power(0); return 0; }
/*----------------------------------------------------------------------------*/ int spade_panel_sleep_in(void) { int ret; LCMDBG(", screen=%s\n", screen_on ? "on" : "off"); if (screen_on) return 0; mutex_lock(&panel_lock); switch (panel_type) { case PANEL_AUO: spade_auo_panel_power(1); lcm_auo_write_seq(auo_sleep_in_seq, ARRAY_SIZE(auo_sleep_in_seq)); ret = 0; break; case PANEL_SHARP: spade_sharp_panel_power(1); lcm_sharp_write_seq(sharp_uninit_seq, ARRAY_SIZE(sharp_uninit_seq)); ret = 0; break; default: ret = -EINVAL; break; } mutex_unlock(&panel_lock); return ret; }
static int spade_sharp_panel_init(struct msm_lcdc_panel_ops *ops) { LCMDBG("\n"); mutex_lock(&panel_lock); spade_sharp_panel_power(1); lcm_sharp_write_seq(sharp_init_seq, ARRAY_SIZE(sharp_init_seq)); mutex_unlock(&panel_lock); return 0; }
static int panel_power(int on) { switch (panel_type) { case PANEL_AUO: case PANEL_ID_SPADE_AUO_N90: spade_auo_panel_power(on == 1 ? true : false); return 0; break; case PANEL_SHARP: case PANEL_ID_SPADE_SHA_N90: spade_sharp_panel_power(on == 1 ? true : false); return 0; break; } return -EINVAL; }