예제 #1
0
static void tl2796_ldi_enable(struct s5p_lcd *lcd)
{
//	struct s5p_panel_data *pdata = lcd->data;

	mutex_lock(&lcd->lock);

	switch (lcd->lcd_type) 
	{
		case 1:
			break;
		case 2:
			break;
		case 3:
			s6e63m0_panel_send_sequence(lcd,LG4573_SEQ_SETTING_TYPE_3);
			break;
		case 0:
		default:
			s6e63m0_panel_send_sequence(lcd,LG4573_SEQ_SETTING_TYPE_0);			
			break;
	}

	s6e63m0_panel_send_sequence(lcd,LG4573_SEQ_SLEEP_OFF);

	update_brightness(lcd);
	lcd->ldi_enable = 1;
	mutex_unlock(&lcd->lock);
}
static void tl2796_ldi_enable(struct s5p_lcd *lcd)
{
	struct s5p_panel_data *pdata = lcd->data;

	mutex_lock(&lcd->lock);

	s6e63m0_panel_send_sequence(lcd, pdata->seq_display_set);
	update_brightness(lcd);
	s6e63m0_panel_send_sequence(lcd, pdata->seq_etc_set);
	lcd->ldi_enable = 1;

	mutex_unlock(&lcd->lock);
}
static void tl2796_ldi_disable(struct s5p_lcd *lcd)
{
	struct s5p_panel_data *pdata = lcd->data;

	mutex_lock(&lcd->lock);

	lcd->ldi_enable = 0;
	s6e63m0_panel_send_sequence(lcd, pdata->standby_on);

	mutex_unlock(&lcd->lock);
}
static void update_brightness(struct s5p_lcd *lcd)
{
	u16 gamma_regs[27];

	gamma_regs[0] = 0x0FA;
	gamma_regs[1] = 0x102;
	gamma_regs[23] = 0x0FA;
	gamma_regs[24] = 0x103;
	gamma_regs[25] = ENDDEF;
	gamma_regs[26] = 0x0000;

	setup_gamma_regs(lcd, gamma_regs + 2);

	s6e63m0_panel_send_sequence(lcd, gamma_regs);
}
예제 #5
0
static void tl2796_ldi_disable(struct s5p_lcd *lcd)
{
//	struct s5p_panel_data *pdata = lcd->data;

	mutex_lock(&lcd->lock);

	s6e63m0_panel_send_sequence(lcd,LG4573_SEQ_SLEEP_ON);
#if 1 /* nat : need to check */
	pwm_config(lcd->backlight_pwm_dev, (bl_freq_count * 0)/255, bl_freq_count);
	pwm_disable(lcd->backlight_pwm_dev);
#endif

	lcd->ldi_enable = 0;

	mutex_unlock(&lcd->lock);
}
예제 #6
0
static void update_acl(struct s5p_lcd *lcd)
{
	struct s5p_panel_data *pdata = lcd->data;
	int gamma_value;

	gamma_value = get_gamma_value_from_bl(lcd->bl);

	if (lcd->acl_enable) {
		if ((lcd->cur_acl == 0) && (gamma_value != 1)) {
			s6e63m0_panel_send_sequence(lcd, pdata->acl_init);
			msleep(20);
		}

		switch (gamma_value) {
		case 0 ... 1:
			if (lcd->cur_acl != 0) {
				s6e63m0_panel_send_sequence(lcd, pdata->acl_table[0]);
				lcd->cur_acl = 0;
				gprintk(" ACL_cutoff_set Percentage : 0!!\n");
			}
			break;
		case 2:
			if (lcd->cur_acl != 20)	{
				s6e63m0_panel_send_sequence(lcd, pdata->acl_table[3]);
				lcd->cur_acl = 20;
				gprintk(" ACL_cutoff_set Percentage : 20!!\n");
			}
			break;
		case 3:
			if (lcd->cur_acl != 32)	{
				s6e63m0_panel_send_sequence(lcd, pdata->acl_table[6]);
				lcd->cur_acl = 32;
				gprintk(" ACL_cutoff_set Percentage : 32!!\n");
			}
			break;
		case 4 ... 23:
                        if (lcd->cur_acl != 40) {
				s6e63m0_panel_send_sequence(lcd, pdata->acl_table[9]);
				lcd->cur_acl = 40;
				gprintk(" ACL_cutoff_set Percentage : 40!!\n");
			}
			break;
		default:
			if (lcd->cur_acl != 50)	{
				s6e63m0_panel_send_sequence(lcd, pdata->acl_table[13]);
				lcd->cur_acl = 50;
				gprintk(" ACL_cutoff_set Percentage : 50!!\n");
			}
		}
	} else	{
예제 #7
0
static void update_acl(struct s5p_lcd *lcd)
{
    struct s5p_panel_data *pdata = lcd->data;
    int gamma_value;

    gamma_value = get_gamma_value_from_bl(lcd->bl);

    if (lcd->acl_enable) {
        if ((lcd->cur_acl == 0) && (gamma_value != 1)) {
            s6e63m0_panel_send_sequence(lcd, pdata->acl_init);
            msleep(20);
        }

        switch (gamma_value) {
        case 1:
            if (lcd->cur_acl != 0) {
                s6e63m0_panel_send_sequence(lcd, pdata->acl_table[0]);
                lcd->cur_acl = 0;
                gprintk(" ACL_cutoff_set Percentage : 0!!\n");
            }
            break;
        case 2 ... 12:
            if (lcd->cur_acl != 40)	{
                s6e63m0_panel_send_sequence(lcd, pdata->acl_table[9]);
                lcd->cur_acl = 40;
                gprintk(" ACL_cutoff_set Percentage : 40!!\n");
            }
            break;
        case 13:
            if (lcd->cur_acl != 43)	{
                s6e63m0_panel_send_sequence(lcd, pdata->acl_table[16]);
                lcd->cur_acl = 43;
                gprintk(" ACL_cutoff_set Percentage : 43!!\n");
            }
            break;
        case 14:
            if (lcd->cur_acl != 45)	{
                s6e63m0_panel_send_sequence(lcd, pdata->acl_table[10]);
                lcd->cur_acl = 45;
                gprintk(" ACL_cutoff_set Percentage : 45!!\n");
            }
            break;
        case 15:
            if (lcd->cur_acl != 47)	{
                s6e63m0_panel_send_sequence(lcd, pdata->acl_table[11]);
                lcd->cur_acl = 47;
                gprintk(" ACL_cutoff_set Percentage : 47!!\n");
            }
            break;
        case 16:
            if (lcd->cur_acl != 48)	{
                s6e63m0_panel_send_sequence(lcd, pdata->acl_table[12]);
                lcd->cur_acl = 48;
                gprintk(" ACL_cutoff_set Percentage : 48!!\n");
            }
            break;
        default:
            if (lcd->cur_acl != 50)	{
                s6e63m0_panel_send_sequence(lcd, pdata->acl_table[13]);
                lcd->cur_acl = 50;
                gprintk(" ACL_cutoff_set Percentage : 50!!\n");
            }
        }
    } else	{