static int samsung_oled_panel_init(struct msm_lcdc_panel_ops *ops)
{
	LCMDBG("%s()\n", __func__);

	amoled_panel_power(1);

	wake_lock(&panel_idle_lock);
	mutex_lock(&panel_lock);
	if (machine_is_passionc()) {
		/* FIXME: display team will clean up the below codes */
		if (system_rev == 0xC0 || system_rev == 0) /* for Passion#C EVT1 */
			lcm_write_tb(lcm_init_seq, ARRAY_SIZE(lcm_init_seq));
		else
			lcm_write_tb(lcm_init_seq, ARRAY_SIZE(lcm_init_666seq));
	} else {
		if (system_rev < 1)
			lcm_write_tb(lcm_init_seq, ARRAY_SIZE(lcm_init_seq));
		else
			lcm_write_tb(lcm_init_seq, ARRAY_SIZE(lcm_init_666seq));
	}
	gamma_table_bank_select();
	mutex_unlock(&panel_lock);
	wake_unlock(&panel_idle_lock);
	return 0;
}
static int samsung_oled_panel_init(void)
{
    LCMDBG("%s()\n", __func__);

    amoled_panel_power(1);

    wake_lock(&panel_idle_lock);
    mutex_lock(&panel_lock);
    if (system_rev < 1)
        lcm_write_tb(lcm_init_seq, ARRAY_SIZE(lcm_init_seq));
    else
        lcm_write_tb(lcm_init_666seq, ARRAY_SIZE(lcm_init_666seq));
    gamma_table_bank_select();
    mutex_unlock(&panel_lock);
    wake_unlock(&panel_idle_lock);
    return 0;
}
static int amoled_panel_blank(struct msm_lcdc_panel_ops *panel_data)
{
	LCMDBG("%s\n", __func__);
	mutex_lock(&panel_lock);
	lcm_write_tb(lcm_standby_seq, ARRAY_SIZE(lcm_standby_seq));
	mutex_unlock(&panel_lock);
	amoled_panel_power(0);
	led_trigger_event(amoled_lcd_backlight, LED_OFF);
	return 0;
}
/*
 * Caller must make sure the spi is ready
 * */
static void sonywvga_set_gamma_val(int val)
{
	uint8_t data[4] = {0, 0, 0, 0};

	if (!is_sony_spi()) {
		//turn on backlight
		data[0] = 5;
		data[1] = sonywvga_panel_shrink_pwm(val);
		data[3] = 1;
		microp_i2c_write(0x25, data, 4);
	} else {
		shrink_pwm = sonywvga_panel_shrink_pwm(val);
	        qspi_send_9bit(&gamma_update);
		if( panel_type == PANEL_ID_SAG_SONY )
			lcm_write_tb(SAG_SONY_GAMMA_UPDATE_TABLE,  ARRAY_SIZE(SAG_SONY_GAMMA_UPDATE_TABLE));
		else
			lcm_write_tb(SONY_GAMMA_UPDATE_TABLE,  ARRAY_SIZE(SONY_GAMMA_UPDATE_TABLE));
	}
	last_val_pwm = val;
}
static int sonywvga_panel_unblank(struct msm_lcdc_panel_ops *panel_data)
{
	LCMDBG("%s\n", __func__);

        wake_lock(&panel_idle_lock);
        mutex_lock(&panel_lock);

	hr_msleep(100);
	qspi_send_9bit(&unblank_msg);
	hr_msleep(20);
	//init gamma setting
	if(!is_sony_with_gamma())
		lcm_write_tb(SONY_TFT_INIT_TABLE,
			ARRAY_SIZE(SONY_TFT_INIT_TABLE));

	sonywvga_set_gamma_val(last_val_pwm);

	g_unblank_stage = 1;

        mutex_unlock(&panel_lock);
        wake_unlock(&panel_idle_lock);

	return 0;
}