static int s6e8ax0_set_elvss(struct lcd_info *lcd, u8 force)
{
	int ret = 0, elvss_level = 0;
	u32 candela = candela_table[lcd->bl];

	switch (candela) {
	case 0 ... 110:
		elvss_level = ELVSS_110;
		break;
	case 111 ... 120:
		elvss_level = ELVSS_120;
		break;
	case 121 ... 130:
		elvss_level = ELVSS_130;
		break;
	case 131 ... 140:
		elvss_level = ELVSS_140;
		break;
	case 141 ... 150:
		elvss_level = ELVSS_150;
		break;
	case 151 ... 160:
		elvss_level = ELVSS_160;
		break;
	case 161 ... 170:
		elvss_level = ELVSS_170;
		break;
	case 171 ... 180:
		elvss_level = ELVSS_180;
		break;
	case 181 ... 190:
		elvss_level = ELVSS_190;
		break;
	case 191 ... 200:
		elvss_level = ELVSS_200;
		break;
	case 201 ... 210:
		elvss_level = ELVSS_210;
		break;
	case 211 ... 220:
		elvss_level = ELVSS_220;
		break;
	case 221 ... 230:
		elvss_level = ELVSS_230;
		break;
	case 231 ... 240:
		elvss_level = ELVSS_240;
		break;
	case 241 ... 250:
		elvss_level = ELVSS_250;
		break;
	case 251 ... 260:
		elvss_level = ELVSS_260;
		break;
	case 261 ... 270:
		elvss_level = ELVSS_270;
		break;
	case 271 ... 280:
		elvss_level = ELVSS_280;
		break;
	case 281 ... 290:
		elvss_level = ELVSS_290;
		break;
	case 291 ... 300:
		elvss_level = ELVSS_300;
		break;
	}

	if (force || lcd->current_elvss != lcd->elvss_table[elvss_level][2]) {
		ret = s6e8ax0_write(lcd, lcd->elvss_table[elvss_level], ELVSS_PARAM_SIZE);
		lcd->current_elvss = lcd->elvss_table[elvss_level][2];
	}

	dev_dbg(&lcd->ld->dev, "elvss = %x\n", lcd->elvss_table[elvss_level][2]);

	if (ret) {
		ret = -EPERM;
		goto elvss_err;
	}

elvss_err:
	return ret;
}
static int s6e8ax0_ldi_init(struct lcd_info *lcd)
{
	int ret = 0;

#if defined(CONFIG_S6E8AA0_AMS529HA01)
	s6e8ax0_write(lcd, SEQ_APPLY_LEVEL_2_KEY, ARRAY_SIZE(SEQ_APPLY_LEVEL_2_KEY));
	s6e8ax0_write(lcd, SEQ_LTPS_DELAY, ARRAY_SIZE(SEQ_LTPS_DELAY));
	s6e8ax0_write(lcd, SEQ_SLEEP_OUT, ARRAY_SIZE(SEQ_SLEEP_OUT));
	msleep(22);
	s6e8ax0_write(lcd, SEQ_PANEL_CONDITION_SET, ARRAY_SIZE(SEQ_PANEL_CONDITION_SET));
	s6e8ax0_write(lcd, SEQ_DISPLAY_CONDITION_SET, ARRAY_SIZE(SEQ_DISPLAY_CONDITION_SET));
	s6e8ax0_gamma_ctl(lcd);
	s6e8ax0_write(lcd, SEQ_ETC_SOURCE_CONTROL, ARRAY_SIZE(SEQ_ETC_SOURCE_CONTROL));
	s6e8ax0_write(lcd, SEQ_ETC_PENTILE_CONTROL, ARRAY_SIZE(SEQ_ETC_PENTILE_CONTROL));
	s6e8ax0_write(lcd, SEQ_ETC_POWER_CONTROL, ARRAY_SIZE(SEQ_ETC_POWER_CONTROL));
	s6e8ax0_write(lcd, SEQ_ELVSS_NVM_SETTING, ARRAY_SIZE(SEQ_ELVSS_NVM_SETTING));
	s6e8ax0_write(lcd, SEQ_ELVSS_CONTROL, ARRAY_SIZE(SEQ_ELVSS_CONTROL));
#else
	s6e8ax0_write(lcd, SEQ_APPLY_LEVEL_2, ARRAY_SIZE(SEQ_APPLY_LEVEL_2));
	s6e8ax0_write(lcd, SEQ_APPLY_MTP_KEY_ENABLE, ARRAY_SIZE(SEQ_APPLY_MTP_KEY_ENABLE));
	s6e8ax0_write(lcd, SEQ_SLEEP_OUT, ARRAY_SIZE(SEQ_SLEEP_OUT));
	msleep(22);

	/* 4.8" HD for M0/C1*/
	if (lcd->id[1] == 0x20 || lcd->id[1] == 0x40 || lcd->id[1] == 0x60) {
#if defined(CONFIG_LCD_REVERSE)
		s6e8ax0_write(lcd, SEQ_REVERSE_PANEL_CONDITION_SET_500MBPS,\
			ARRAY_SIZE(SEQ_REVERSE_PANEL_CONDITION_SET_500MBPS));
#else
		s6e8ax0_write(lcd, SEQ_PANEL_CONDITION_SET_500MBPS,\
			ARRAY_SIZE(SEQ_PANEL_CONDITION_SET_500MBPS));
#endif
		s6e8ax0_write(lcd, SEQ_DISPLAY_CONDITION_SET, ARRAY_SIZE(SEQ_DISPLAY_CONDITION_SET));
		s6e8ax0_gamma_ctl(lcd);
		s6e8ax0_write(lcd, SEQ_ETC_SOURCE_CONTROL, ARRAY_SIZE(SEQ_ETC_SOURCE_CONTROL));
		s6e8ax0_write(lcd, SEQ_ETC_PENTILE_CONTROL, ARRAY_SIZE(SEQ_ETC_PENTILE_CONTROL));
		s6e8ax0_write(lcd, SEQ_ETC_NVM_SETTING, ARRAY_SIZE(SEQ_ETC_NVM_SETTING));
		s6e8ax0_write(lcd, SEQ_ETC_POWER_CONTROL, ARRAY_SIZE(SEQ_ETC_POWER_CONTROL));
	} else if (lcd->id[1] == 0xae) {
		s6e8ax0_write(lcd, SEQ_PANEL_CONDITION_SET_480MBPS_46, ARRAY_SIZE(SEQ_PANEL_CONDITION_SET_480MBPS_46));
		s6e8ax0_write(lcd, SEQ_DISPLAY_CONDITION_SET, ARRAY_SIZE(SEQ_DISPLAY_CONDITION_SET));
		s6e8ax0_gamma_ctl(lcd);
		s6e8ax0_write(lcd, SEQ_ETC_SOURCE_CONTROL, ARRAY_SIZE(SEQ_ETC_SOURCE_CONTROL));
		s6e8ax0_write(lcd, SEQ_ETC_PENTILE_CONTROL_46, ARRAY_SIZE(SEQ_ETC_PENTILE_CONTROL_46));
		s6e8ax0_write(lcd, SEQ_ETC_NVM_SETTING_46, ARRAY_SIZE(SEQ_ETC_NVM_SETTING_46));
		s6e8ax0_write(lcd, SEQ_ETC_POWER_CONTROL_46, ARRAY_SIZE(SEQ_ETC_POWER_CONTROL_46));
	} else {
		s6e8ax0_write(lcd, SEQ_PANEL_CONDITION_SET_500MBPS_46, ARRAY_SIZE(SEQ_PANEL_CONDITION_SET_500MBPS_46));
		s6e8ax0_write(lcd, SEQ_DISPLAY_CONDITION_SET, ARRAY_SIZE(SEQ_DISPLAY_CONDITION_SET));
		s6e8ax0_gamma_ctl(lcd);
		s6e8ax0_write(lcd, SEQ_ETC_SOURCE_CONTROL, ARRAY_SIZE(SEQ_ETC_SOURCE_CONTROL));
		s6e8ax0_write(lcd, SEQ_ETC_PENTILE_CONTROL_46, ARRAY_SIZE(SEQ_ETC_PENTILE_CONTROL_46));
		s6e8ax0_write(lcd, SEQ_ETC_NVM_SETTING_46, ARRAY_SIZE(SEQ_ETC_NVM_SETTING_46));
		s6e8ax0_write(lcd, SEQ_ETC_POWER_CONTROL_46, ARRAY_SIZE(SEQ_ETC_POWER_CONTROL_46));
	}

	s6e8ax0_write(lcd, SEQ_ELVSS_CONTROL, ARRAY_SIZE(SEQ_ELVSS_CONTROL));
#endif

	return ret;
}
static int s6e8ax0_set_acl(struct lcd_info *lcd, u8 force)
{
	int ret = 0, enable, level;
	u32 candela = candela_table[lcd->bl];

	switch (candela) {
	case 0 ... 49:
		level = ACL_STATUS_0P;
		break;
	case 50 ... 59:
		level = ACL_STATUS_20P;
		break;
	case 60 ... 69:
		level = ACL_STATUS_33P;
		break;
	case 70 ... 79:
		level = ACL_STATUS_43P;
		break;
	case 80 ... 89:
		level = ACL_STATUS_45P_80CD;
		break;
	case 90 ... 159:
		level = ACL_STATUS_45P;
		break;
	case 160 ... 169:
		level = ACL_STATUS_46P_160CD;
		break;
	case 170 ... 250:
		level = ACL_STATUS_46P;
		break;
	default:
		level = ACL_STATUS_50P;
		break;
	}

	if (!lcd->acl_enable)
		level = ACL_STATUS_0P;

	enable = !!level;

	//if (force || lcd->acl_enable != enable) {
		dev_dbg(&lcd->ld->dev, "acl turn %s\n", enable ? "on" : "off");
		if (enable)
			ret = s6e8ax0_write(lcd, SEQ_ACL_ON, ARRAY_SIZE(SEQ_ACL_ON));
		else {
			ret = s6e8ax0_write(lcd, SEQ_ACL_OFF, ARRAY_SIZE(SEQ_ACL_OFF));
			goto exit;
		}
	//}

	//if (force || lcd->current_acl != level) {
		ret = s6e8ax0_write(lcd, ACL_CUTOFF_TABLE[level], ACL_PARAM_SIZE);
		lcd->current_acl = level;
		dev_dbg(&lcd->ld->dev, "current_acl = %d\n", lcd->current_acl);
	//}

	if (ret)
		ret = -EPERM;

exit:
	return ret;
}
Пример #4
0
static int s6e8ax0_set_acl(struct lcd_info *lcd)
{
	if (lcd->acl_enable) {
		if (lcd->cur_acl == 0) {
			if (lcd->bl == 0 || lcd->bl == 1) {
				s6e8ax0_write(lcd, SEQ_ACL_OFF, ARRAY_SIZE(SEQ_ACL_OFF));
				dev_dbg(&lcd->ld->dev, "%s : cur_acl=%d\n", __func__, lcd->cur_acl);
			} else
				s6e8ax0_write(lcd, SEQ_ACL_ON, ARRAY_SIZE(SEQ_ACL_ON));
		}
		switch (lcd->bl) {
		case 0 ... 1: /* 30cd ~ 40cd - 0%*/
			if (lcd->cur_acl != 0) {
				s6e8ax0_write(lcd, SEQ_ACL_OFF, ARRAY_SIZE(SEQ_ACL_OFF));
				lcd->cur_acl = 0;
				dev_dbg(&lcd->ld->dev, "%s : cur_acl=%d\n", __func__, lcd->cur_acl);
			}
			break;
		case 2 ... 12: /* 70cd ~ 180cd -40%*/
			if (lcd->cur_acl != 40) {
				s6e8ax0_write(lcd, acl_cutoff_table[1], ACL_PARAM_SIZE);
				lcd->cur_acl = 40;
				dev_dbg(&lcd->ld->dev, "%s : cur_acl=%d\n", __func__, lcd->cur_acl);
			}
			break;
		case 13: /* 190cd - 43% */
			if (lcd->cur_acl != 43) {
				s6e8ax0_write(lcd, acl_cutoff_table[2], ACL_PARAM_SIZE);
				lcd->cur_acl = 43;
				dev_dbg(&lcd->ld->dev, "%s : cur_acl=%d\n", __func__, lcd->cur_acl);
			}
			break;
		case 14: /* 200cd - 45% */
			if (lcd->cur_acl != 45) {
				s6e8ax0_write(lcd, acl_cutoff_table[3], ACL_PARAM_SIZE);
				lcd->cur_acl = 45;
				dev_dbg(&lcd->ld->dev, "%s : cur_acl=%d\n", __func__, lcd->cur_acl);
			}
			break;
		case 15: /* 210cd - 47% */
			if (lcd->cur_acl != 47) {
				s6e8ax0_write(lcd, acl_cutoff_table[4], ACL_PARAM_SIZE);
				lcd->cur_acl = 47;
				dev_dbg(&lcd->ld->dev, "%s : cur_acl=%d\n", __func__, lcd->cur_acl);
			}
			break;
		case 16: /* 220cd - 48% */
			if (lcd->cur_acl != 48) {
				s6e8ax0_write(lcd, acl_cutoff_table[5], ACL_PARAM_SIZE);
				lcd->cur_acl = 48;
				dev_dbg(&lcd->ld->dev, "%s : cur_acl=%d\n", __func__, lcd->cur_acl);
			}
			break;
		default:
			if (lcd->cur_acl != 50) {
				s6e8ax0_write(lcd, acl_cutoff_table[6], ACL_PARAM_SIZE);
				lcd->cur_acl = 50;
				dev_dbg(&lcd->ld->dev, "%s : cur_acl=%d\n", __func__, lcd->cur_acl);
			}
			break;
		}
	} else {
Пример #5
0
static int s6e8ax0_set_acl(struct lcd_info *lcd)
{
	int ret = 0;

	if (lcd->acl_enable) {
		if (lcd->cur_acl == 0) {
			if (lcd->bl == 0 || lcd->bl == 1) {
				s6e8ax0_write(lcd, SEQ_ACL_OFF, ARRAY_SIZE(SEQ_ACL_OFF));
				dev_dbg(lcd->dev, "ACL_cutoff_set Percentage : off!!\n");
			} else
				s6e8ax0_write(lcd, SEQ_ACL_ON, ARRAY_SIZE(SEQ_ACL_ON));
		}
		switch (lcd->bl) {
		case 0 ... 1: /* 30cd ~ 40cd */
			if (lcd->cur_acl != 0) {
				s6e8ax0_write(lcd, SEQ_ACL_OFF, ARRAY_SIZE(SEQ_ACL_OFF));
				dev_dbg(&lcd->ld->dev, "ACL_cutoff_set Percentage : off!!\n");
				lcd->cur_acl = 0;
			}
			break;
		case 2 ... 12: /* 70cd ~ 180cd */
			if (lcd->cur_acl != 40) {
				panel_acl_send_sequence(lcd, acl_cutoff_table[1]);
				dev_dbg(&lcd->ld->dev, "ACL_cutoff_set Percentage : 40!!\n");
				lcd->cur_acl = 40;
			}
			break;
		case 13: /* 190cd */
			if (lcd->cur_acl != 43) {
				panel_acl_send_sequence(lcd, acl_cutoff_table[2]);
				dev_dbg(&lcd->ld->dev, "ACL_cutoff_set Percentage : 43!!\n");
				lcd->cur_acl = 43;
			}
			break;
		case 14: /* 200cd */
			if (lcd->cur_acl != 45) {
				panel_acl_send_sequence(lcd, acl_cutoff_table[3]);
				dev_dbg(&lcd->ld->dev, "ACL_cutoff_set Percentage : 45!!\n");
				lcd->cur_acl = 45;
			}
			break;
		case 15: /* 210cd */
			if (lcd->cur_acl != 47) {
				panel_acl_send_sequence(lcd, acl_cutoff_table[4]);
				dev_dbg(&lcd->ld->dev, "ACL_cutoff_set Percentage : 47!!\n");
				lcd->cur_acl = 47;
			}
			break;
		case 16: /* 220cd */
			if (lcd->cur_acl != 48) {
				panel_acl_send_sequence(lcd, acl_cutoff_table[5]);
				dev_dbg(&lcd->ld->dev, "ACL_cutoff_set Percentage : 48!!\n");
				lcd->cur_acl = 48;
			}
			break;
		default:
			if (lcd->cur_acl != 50) {
				panel_acl_send_sequence(lcd, acl_cutoff_table[6]);
				dev_dbg(&lcd->ld->dev, "ACL_cutoff_set Percentage : 50!!\n");
				lcd->cur_acl = 50;
			}
			break;
		}
	} else {
Пример #6
0
static int s6e8ax0_ldi_init(struct lcd_info *lcd)
{
	int ret = 0;
	s6e8ax0_write(lcd, SEQ_APPLY_LEVEL_2_KEY_ENABLE, ARRAY_SIZE(SEQ_APPLY_LEVEL_2_KEY_ENABLE));
	s6e8ax0_write(lcd, SEQ_APPLY_LEVEL_3_KEY, ARRAY_SIZE(SEQ_APPLY_LEVEL_3_KEY));
	s6e8ax0_write(lcd, SEQ_AUTO_RECOVERY, ARRAY_SIZE(SEQ_AUTO_RECOVERY));
	if (lcd->id[1] == 0x13) {  /* M4 */
		s6e8ax0_write(lcd, SEQ_M4_PANEL_CONDITION_SET, ARRAY_SIZE(SEQ_M4_PANEL_CONDITION_SET));
		s6e8ax0_write(lcd, SEQ_DISPLAY_CONDITION_SET, ARRAY_SIZE(SEQ_DISPLAY_CONDITION_SET));
/*		s6e8ax0_write(lcd, SEQ_FRAME_GAMMA_UPDATE_KEY, ARRAY_SIZE(SEQ_FRAME_GAMMA_UPDATE_KEY));
		s6e8ax0_write(lcd, SEQ_M4_GAMMA_CONDITION_SET, ARRAY_SIZE(SEQ_M4_GAMMA_CONDITION_SET));
		s6e8ax0_write(lcd, SEQ_FRAME_GAMMA_UPDATE_KEY2, ARRAY_SIZE(SEQ_FRAME_GAMMA_UPDATE_KEY2)); */
		s6e8ax0_gamma_ctl(lcd);
		s6e8ax0_write(lcd, SEQ_LTPS_AID, ARRAY_SIZE(SEQ_LTPS_AID));
		s6e8ax0_write(lcd, ELVSS_CONTROL_SET, ARRAY_SIZE(ELVSS_CONTROL_SET));
		s6e8ax0_write(lcd, SEQ_ETC_WCABC_CONTROL, ARRAY_SIZE(SEQ_ETC_WCABC_CONTROL));
		s6e8ax0_write(lcd, SEQ_M4_SLEW, ARRAY_SIZE(SEQ_M4_SLEW));
	} else {  /* SM2 */
		s6e8ax0_write(lcd, SEQ_PANEL_CONDITION_SET, ARRAY_SIZE(SEQ_PANEL_CONDITION_SET));
		s6e8ax0_write(lcd, SEQ_DISPLAY_CONDITION_SET, ARRAY_SIZE(SEQ_DISPLAY_CONDITION_SET));
/*		s6e8ax0_write(lcd, SEQ_FRAME_GAMMA_UPDATE_KEY, ARRAY_SIZE(SEQ_FRAME_GAMMA_UPDATE_KEY));
		s6e8ax0_write(lcd, SEQ_GAMMA_CONDITION_SET, ARRAY_SIZE(SEQ_GAMMA_CONDITION_SET));
		s6e8ax0_write(lcd, SEQ_FRAME_GAMMA_UPDATE_KEY2, ARRAY_SIZE(SEQ_FRAME_GAMMA_UPDATE_KEY2)); */
		s6e8ax0_gamma_ctl(lcd);
		s6e8ax0_write(lcd, SEQ_LTPS_AID, ARRAY_SIZE(SEQ_LTPS_AID));
		s6e8ax0_write(lcd, ELVSS_CONTROL_SET, ARRAY_SIZE(ELVSS_CONTROL_SET));
		s6e8ax0_write(lcd, SEQ_ETC_WCABC_CONTROL, ARRAY_SIZE(SEQ_ETC_WCABC_CONTROL));
		slew_rev_control_set(lcd);
	}

	s6e8ax0_write(lcd, SEQ_SLEEP_OUT, ARRAY_SIZE(SEQ_SLEEP_OUT));

	return ret;
}
Пример #7
0
static int s6e8ax0_set_elvss(struct lcd_info *lcd)
{
	switch (lcd->bl) {
	case GAMMA_20CD ... GAMMA_40CD:
		if (lcd->current_elvss != 20) {
			s6e8ax0_write(lcd, ELVSS_CONTROL_TABLE[ELVSS_STATUS_20], ELVSS_PARAM_SIZE);
			lcd->current_elvss = 20;
			dev_dbg(&lcd->ld->dev, "%s : current_elvss =%d\n", __func__, lcd->current_elvss);
		}
		break;
	case GAMMA_50CD ... GAMMA_70CD:
		if (lcd->current_elvss != 50) {
			s6e8ax0_write(lcd, ELVSS_CONTROL_TABLE[ELVSS_STATUS_50], ELVSS_PARAM_SIZE);
			lcd->current_elvss = 50;
			dev_dbg(&lcd->ld->dev, "%s : current_elvss =%d\n", __func__, lcd->current_elvss);
		}
		break;
	case GAMMA_80CD ... GAMMA_90CD:
		if (lcd->current_elvss != 80) {
			s6e8ax0_write(lcd, ELVSS_CONTROL_TABLE[ELVSS_STATUS_80], ELVSS_PARAM_SIZE);
			lcd->current_elvss = 80;
			dev_dbg(&lcd->ld->dev, "%s : current_elvss =%d\n", __func__, lcd->current_elvss);
		}
		break;
	case GAMMA_100CD:
		if (lcd->current_elvss != 100) {
			s6e8ax0_write(lcd, ELVSS_CONTROL_TABLE[ELVSS_STATUS_100], ELVSS_PARAM_SIZE);
			lcd->current_elvss = 100;
			dev_dbg(&lcd->ld->dev, "%s : current_elvss =%d\n", __func__, lcd->current_elvss);
		}
		break;
	case GAMMA_110CD:
		if (lcd->current_elvss != 110) {
			s6e8ax0_write(lcd, ELVSS_CONTROL_TABLE[ELVSS_STATUS_110], ELVSS_PARAM_SIZE);
			lcd->current_elvss = 110;
			dev_dbg(&lcd->ld->dev, "%s : current_elvss =%d\n", __func__, lcd->current_elvss);
		}
		break;
	case GAMMA_120CD:
		if (lcd->current_elvss != 120) {
			s6e8ax0_write(lcd, ELVSS_CONTROL_TABLE[ELVSS_STATUS_120], ELVSS_PARAM_SIZE);
			lcd->current_elvss = 120;
			dev_dbg(&lcd->ld->dev, "%s : current_elvss =%d\n", __func__, lcd->current_elvss);
		}
		break;
	case GAMMA_130CD:
		if (lcd->current_elvss != 130) {
			s6e8ax0_write(lcd, ELVSS_CONTROL_TABLE[ELVSS_STATUS_130], ELVSS_PARAM_SIZE);
			lcd->current_elvss = 130;
			dev_dbg(&lcd->ld->dev, "%s : current_elvss =%d\n", __func__, lcd->current_elvss);
		}
		break;
	case GAMMA_140CD:
		if (lcd->current_elvss != 140) {
			s6e8ax0_write(lcd, ELVSS_CONTROL_TABLE[ELVSS_STATUS_140], ELVSS_PARAM_SIZE);
			lcd->current_elvss = 140;
			dev_dbg(&lcd->ld->dev, "%s : current_elvss =%d\n", __func__, lcd->current_elvss);
		}
		break;
	case GAMMA_150CD:
		if (lcd->current_elvss != 150) {
			s6e8ax0_write(lcd, ELVSS_CONTROL_TABLE[ELVSS_STATUS_150], ELVSS_PARAM_SIZE);
			lcd->current_elvss = 150;
			dev_dbg(&lcd->ld->dev, "%s : current_elvss =%d\n", __func__, lcd->current_elvss);
		}
		break;
	case GAMMA_160CD:
		if (lcd->current_elvss != 160) {
			s6e8ax0_write(lcd, ELVSS_CONTROL_TABLE[ELVSS_STATUS_160], ELVSS_PARAM_SIZE);
			lcd->current_elvss = 160;
			dev_dbg(&lcd->ld->dev, "%s : current_elvss =%d\n", __func__, lcd->current_elvss);
		}
		break;
	case GAMMA_170CD:
		if (lcd->current_elvss != 170) {
			s6e8ax0_write(lcd, ELVSS_CONTROL_TABLE[ELVSS_STATUS_170], ELVSS_PARAM_SIZE);
			lcd->current_elvss = 170;
			dev_dbg(&lcd->ld->dev, "%s : current_elvss =%d\n", __func__, lcd->current_elvss);
		}
		break;
	case GAMMA_180CD ... GAMMA_188CD:
		if (lcd->current_elvss != 180) {
			s6e8ax0_write(lcd, ELVSS_CONTROL_TABLE[ELVSS_STATUS_180], ELVSS_PARAM_SIZE);
			lcd->current_elvss = 180;
			dev_dbg(&lcd->ld->dev, "%s : current_elvss =%d\n", __func__, lcd->current_elvss);
		}
		break;
	case GAMMA_190CD:
		if (lcd->current_elvss != 190) {
			s6e8ax0_write(lcd, ELVSS_CONTROL_TABLE[ELVSS_STATUS_190], ELVSS_PARAM_SIZE);
			lcd->current_elvss = 190;
			dev_dbg(&lcd->ld->dev, "%s : current_elvss =%d\n", __func__, lcd->current_elvss);
		}
		break;
	case GAMMA_200CD:
		if (lcd->current_elvss != 200) {
			s6e8ax0_write(lcd, ELVSS_CONTROL_TABLE[ELVSS_STATUS_200], ELVSS_PARAM_SIZE);
			lcd->current_elvss = 200;
			dev_dbg(&lcd->ld->dev, "%s : current_elvss =%d\n", __func__, lcd->current_elvss);
		}
		break;
	case GAMMA_210CD:
		if (lcd->current_elvss != 210) {
			s6e8ax0_write(lcd, ELVSS_CONTROL_TABLE[ELVSS_STATUS_210], ELVSS_PARAM_SIZE);
			lcd->current_elvss = 210;
			dev_dbg(&lcd->ld->dev, "%s : current_elvss =%d\n", __func__, lcd->current_elvss);
		}
		break;
	case GAMMA_220CD:
		if (lcd->current_elvss != 220) {
			s6e8ax0_write(lcd, ELVSS_CONTROL_TABLE[ELVSS_STATUS_220], ELVSS_PARAM_SIZE);
			lcd->current_elvss = 220;
			dev_dbg(&lcd->ld->dev, "%s : current_elvss =%d\n", __func__, lcd->current_elvss);
		}
		break;
	case GAMMA_230CD:
		if (lcd->current_elvss != 230) {
			s6e8ax0_write(lcd, ELVSS_CONTROL_TABLE[ELVSS_STATUS_230], ELVSS_PARAM_SIZE);
			lcd->current_elvss = 230;
			dev_dbg(&lcd->ld->dev, "%s : current_elvss =%d\n", __func__, lcd->current_elvss);
		}
		break;
	case GAMMA_240CD ... GAMMA_250CD:
		if (lcd->current_elvss != 240) {
			s6e8ax0_write(lcd, ELVSS_CONTROL_TABLE[ELVSS_STATUS_240], ELVSS_PARAM_SIZE);
			lcd->current_elvss = 240;
			dev_dbg(&lcd->ld->dev, "%s : current_elvss =%d\n", __func__, lcd->current_elvss);
		}
		break;
	case GAMMA_300CD:
		if (lcd->current_elvss != 300) {
			s6e8ax0_write(lcd, ELVSS_CONTROL_TABLE[ELVSS_STATUS_300], ELVSS_PARAM_SIZE);
			lcd->current_elvss = 300;
			dev_dbg(&lcd->ld->dev, "%s : current_elvss =%d\n", __func__, lcd->current_elvss);
		}
		break;

	default:
		s6e8ax0_write(lcd, ELVSS_CONTROL_TABLE[ELVSS_STATUS_160], ELVSS_PARAM_SIZE);
		dev_dbg(&lcd->ld->dev, "%s : current_elvss =%d\n", __func__, lcd->current_elvss);
		break;

	}

	return 0;
}