static int s6e63m0_set_acl(struct lcd_info *lcd) { if (lcd->acl_enable) { if (lcd->cur_acl == 0) { if (lcd->bl == 0 || lcd->bl == 1) { s6e63m0_write(lcd, SEQ_ACL_OFF, ARRAY_SIZE(SEQ_ACL_OFF)); dev_dbg(&lcd->ld->dev, "%s : cur_acl=%d, acl_off\n", __func__, lcd->cur_acl); } else { s6e63m0_write(lcd, SEQ_ACL_ON, ARRAY_SIZE(SEQ_ACL_ON)); dev_dbg(&lcd->ld->dev, "%s : cur_acl=%d, acl_on\n", __func__, lcd->cur_acl); } } switch (lcd->bl) { case GAMMA_30CD ... GAMMA_40CD: s6e63m0_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 GAMMA_50CD ... GAMMA_300CD: s6e63m0_write(lcd, ACL_CUTOFF_TABLE[ACL_STATUS_40P], ACL_PARAM_SIZE); lcd->cur_acl = 40; dev_dbg(&lcd->ld->dev, "%s : cur_acl=%d\n", __func__, lcd->cur_acl); break; default: lcd->cur_acl = 0; dev_dbg(&lcd->ld->dev, "%s : cur_acl=%d\n", __func__, lcd->cur_acl); break; } } else {
static int s6e63m0_gamma_ctl(struct lcd_info *lcd) { lcd->f8[0x12] = aid_command_table[lcd->bl][0]; lcd->f8[0x01] = aid_command_table[lcd->bl][1]; s6e63m0_write(lcd, lcd->gamma_table[lcd->bl], GAMMA_PARAM_SIZE); s6e63m0_write(lcd, SEQ_GAMMA_UPDATE, ARRAY_SIZE(SEQ_GAMMA_UPDATE)); if (likely(lcd->support_aid)) s6e63m0_write(lcd, lcd->f8, AID_PARAM_SIZE); return 0; }
static int s6e63m0_gamma_ctl(struct lcd_info *lcd) { #ifdef SMART_DIMMING_DEBUG_LCD int j; #endif s6e63m0_write(lcd, lcd->gamma_table[lcd->bl], GAMMA_PARAM_SIZE); s6e63m0_write(lcd, SEQ_GAMMA_UPDATE, ARRAY_SIZE(SEQ_GAMMA_UPDATE)); #ifdef SMART_DIMMING_DEBUG_LCD pr_info("bl = %d\n", lcd->bl); for (j = 0; j < GAMMA_PARAM_SIZE; j++) pr_info("0x%02x, ", lcd->gamma_table[lcd->bl][j]); #endif return 0; }
static int s6e63m0_gamma_ctl(struct lcd_info *lcd) { #if defined(CONFIG_MACH_M0_GRANDECTC) || defined(CONFIG_MACH_IRON) s6e63m0_write(lcd, SEQ_GAMMA_CONDITION_SET, ARRAY_SIZE(SEQ_GAMMA_CONDITION_SET)); #else s6e63m0_write(lcd, lcd->gamma_table[lcd->bl], GAMMA_PARAM_SIZE); #endif /* Gamma Set Update */ s6e63m0_write(lcd, SEQ_GAMMA_UPDATE, ARRAY_SIZE(SEQ_GAMMA_UPDATE)); return 0; }
static int s6e63m0_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) { s6e63m0_write(lcd, SEQ_ACL_OFF, ARRAY_SIZE(SEQ_ACL_OFF)); dev_dbg(&lcd->ld->dev, "%s : cur_acl=%d, acl_off\n", __func__, lcd->cur_acl); } else { s6e63m0_write(lcd, SEQ_ACL_ON, ARRAY_SIZE(SEQ_ACL_ON)); dev_dbg(&lcd->ld->dev, "%s : cur_acl=%d, acl_on\n", __func__, lcd->cur_acl); } } switch (lcd->bl) { case GAMMA_30CD... GAMMA_40CD: if (lcd->cur_acl != 0) { s6e63m0_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 GAMMA_50CD: if (lcd->cur_acl != 200) { s6e63m0_write(lcd, ACL_CUTOFF_TABLE[ACL_STATUS_20P], ACL_PARAM_SIZE); lcd->cur_acl = 200; dev_dbg(&lcd->ld->dev, "%s : cur_acl=%d\n", __func__, lcd->cur_acl); } break; case GAMMA_60CD: if (lcd->cur_acl != 330) { s6e63m0_write(lcd, ACL_CUTOFF_TABLE[ACL_STATUS_33P], ACL_PARAM_SIZE); lcd->cur_acl = 330; dev_dbg(&lcd->ld->dev, "%s : cur_acl=%d\n", __func__, lcd->cur_acl); } break; case GAMMA_70CD: if (lcd->cur_acl != 430) { s6e63m0_write(lcd, ACL_CUTOFF_TABLE[ACL_STATUS_43P], ACL_PARAM_SIZE); lcd->cur_acl = 430; dev_dbg(&lcd->ld->dev, "%s : cur_acl=%d\n", __func__, lcd->cur_acl); } break; case GAMMA_80CD: if (lcd->cur_acl != 450) { s6e63m0_write(lcd, ACL_CUTOFF_TABLE[ACL_STATUS_45P_80CD], ACL_PARAM_SIZE); lcd->cur_acl = 450; dev_dbg(&lcd->ld->dev, "%s : cur_acl=%d\n", __func__, lcd->cur_acl); } break; case GAMMA_90CD ... GAMMA_150CD: if (lcd->cur_acl != 451) { s6e63m0_write(lcd, ACL_CUTOFF_TABLE[ACL_STATUS_45P], ACL_PARAM_SIZE); lcd->cur_acl = 451; dev_dbg(&lcd->ld->dev, "%s : cur_acl=%d\n", __func__, lcd->cur_acl); } break; case GAMMA_160CD: /* 160cd */ if (lcd->cur_acl != 460) { s6e63m0_write(lcd, ACL_CUTOFF_TABLE[ACL_STATUS_46P_160CD], ACL_PARAM_SIZE); lcd->cur_acl = 460; dev_dbg(&lcd->ld->dev, "%s : cur_acl=%d\n", __func__, lcd->cur_acl); } break; case GAMMA_170CD ... GAMMA_250CD: if (lcd->cur_acl != 461) { s6e63m0_write(lcd, ACL_CUTOFF_TABLE[ACL_STATUS_46P], `ACL_PARAM_SIZE); lcd->cur_acl = 461; dev_dbg(&lcd->ld->dev, "%s : cur_acl=%d\n", __func__, lcd->cur_acl); } break; default: if (lcd->cur_acl != 550) { s6e63m0_write(lcd, ACL_CUTOFF_TABLE[ACL_STATUS_50P], ACL_PARAM_SIZE); lcd->cur_acl = 550; dev_dbg(&lcd->ld->dev, "%s : cur_acl=%d\n", __func__, lcd->cur_acl); } break; } } else {