Exemplo n.º 1
0
void mdnie_late_resume(struct early_suspend *h)
{
	struct mdnie_info *mdnie = container_of(h, struct mdnie_info, early_suspend);
#if defined(CONFIG_FB_MDNIE_PWM)
	struct lcd_platform_data *pd = NULL;
	pd = mdnie->lcd_pd;
#endif

	dev_info(mdnie->dev, "+%s\n", __func__);

#if defined(CONFIG_FB_MDNIE_PWM)
	if (mdnie->enable)
		mdnie_pwm_control(mdnie, 0);

	if (!pd)
		dev_info(&mdnie->bd->dev, "platform data is NULL.\n");

	if (!pd->power_on)
		dev_info(&mdnie->bd->dev, "power_on is NULL.\n");
	else
		pd->power_on(NULL, 1);

	if (mdnie->enable) {
		dev_info(&mdnie->bd->dev, "brightness=%d\n", mdnie->bd->props.brightness);
		update_brightness(mdnie);
	}

	mdnie->bd_enable = TRUE;
#endif

	dev_info(mdnie->dev, "-%s\n", __func__);

	return ;
}
Exemplo n.º 2
0
void mdnie_early_suspend(struct early_suspend *h)
{
#if defined(CONFIG_FB_MDNIE_PWM)
 	struct mdnie_info *mdnie = container_of(h, struct mdnie_info, early_suspend);
 	struct lcd_platform_data *pd = NULL;
 	pd = mdnie->lcd_pd;
 
 	dev_info(mdnie->dev, "+%s\n", __func__);
 
 	mdnie->bd_enable = FALSE;
 
 	if (mdnie->enable)
 		mdnie_pwm_control(mdnie, 0);
 
 	if (!pd)
 		dev_info(&mdnie->bd->dev, "platform data is NULL.\n");
 
 	if (!pd->power_on)
 		dev_info(&mdnie->bd->dev, "power_on is NULL.\n");
 	else
 		pd->power_on(NULL, 0);
 
 	dev_info(mdnie->dev, "-%s\n", __func__);
#endif
 
      mdnie_status = MDNIE_SUSPEND;
      mdnie_value_setted = TUNNING_SCRNARIO_MAX;

      printk("[mdnie] %s \n", __func__);
 
 	return ;
}
Exemplo n.º 3
0
void mdnie_early_suspend(struct early_suspend *h)
{
#if defined(CONFIG_FB_MDNIE_PWM)
	struct mdnie_info *mdnie = container_of(h, struct mdnie_info, early_suspend);
	struct lcd_platform_data *pd = NULL;
	pd = mdnie->lcd_pd;

	dev_info(mdnie->dev, "+%s\n", __func__);

	if (mdnie->enable)
		mdnie_pwm_control(mdnie, 0);

	if (!pd)
		dev_info(&mdnie->bd->dev, "platform data is NULL.\n");

	if (!pd->power_on)
		dev_info(&mdnie->bd->dev, "power_on is NULL.\n");
	else
		pd->power_on(NULL, 0);

	mdnie->bd_enable = FALSE;

	dev_info(mdnie->dev, "-%s\n", __func__);
#endif

	return ;
}
Exemplo n.º 4
0
static void mdnie_shutdown(struct platform_device *pdev)
{
#if defined(CONFIG_FB_MDNIE_PWM)
	struct mdnie_info *mdnie = dev_get_drvdata(&pdev->dev);
	struct lcd_platform_data *pd = NULL;
	pd = mdnie->lcd_pd;

	dev_info(mdnie->dev, "+%s\n", __func__);

	mdnie->bd_enable = FALSE;

	if (mdnie->enable)
		mdnie_pwm_control(mdnie, 0);

	if (!pd)
		dev_info(&mdnie->bd->dev, "platform data is NULL.\n");

	if (!pd->power_on)
		dev_info(&mdnie->bd->dev, "power_on is NULL.\n");
	else
		pd->power_on(NULL, 0);

	dev_info(mdnie->dev, "-%s\n", __func__);
#endif
}
Exemplo n.º 5
0
static int update_brightness(struct mdnie_info *mdnie)
{
	unsigned int value;
	unsigned int brightness = mdnie->bd->props.brightness;

	value = get_backlight_level_from_brightness(brightness);

	if (!mdnie->enable) {
		dev_err(mdnie->dev, "WTH! do not configure mDNIe after LCD/mDNIe power off\n");
		return 0;
	}
	if (brightness <= CABC_CUTOFF_BACKLIGHT_VALUE) {
		mdnie_pwm_control(mdnie, value);
	} else {
		if ((mdnie->cabc) && (mdnie->scenario != CAMERA_MODE) && !(mdnie->tunning))
			mdnie_pwm_control_cabc(mdnie, value);
		else
			mdnie_pwm_control(mdnie, value);
	}
	return 0;
}
Exemplo n.º 6
0
static int update_brightness(struct mdnie_info *mdnie)
{
	unsigned int value;
	unsigned int brightness = mdnie->bd->props.brightness;

	value = get_backlight_level_from_brightness(mdnie, brightness);

	if (!mdnie->enable) {
		dev_err(mdnie->dev, "mdnie states is off\n");
		return 0;
	}

	if (brightness <= CABC_OFF_BRIGHTNESS_VALUE) {
		mdnie_pwm_control(mdnie, value);
	} else {
		if ((mdnie->cabc) && (mdnie->scenario != CAMERA_MODE) && !(mdnie->tuning))
			mdnie_pwm_control_cabc(mdnie, value);
		else
			mdnie_pwm_control(mdnie, value);
	}
	return 0;
}
Exemplo n.º 7
0
static void mdnie_early_suspend(struct early_suspend *h)
{
	struct mdnie_info *mdnie = container_of(h, struct mdnie_info, early_suspend);
	struct lcd_platform_data *pd = mdnie->lcd_pd;

	dev_info(mdnie->dev, "+%s\n", __func__);

	mdnie->bd_enable = FALSE;

	if (mdnie->enable)
		mdnie_pwm_control(mdnie, 0);

	if (pd && pd->power_on)
		pd->power_on(NULL, 0);

	dev_info(mdnie->dev, "-%s\n", __func__);

	return;
}
void mdnie_late_resume(struct early_suspend *h)
{
	u32 i;
	struct mdnie_info *mdnie = container_of(h, struct mdnie_info, early_suspend);
	struct lcd_platform_data *pd = NULL;

	dev_info(mdnie->dev, "+%s\n", __func__);

#if defined(CONFIG_FB_MDNIE_PWM)
	pd = mdnie->lcd_pd;

	if (mdnie->enable)
		mdnie_pwm_control(mdnie, 0);

	if (!pd)
		dev_info(&mdnie->bd->dev, "platform data is NULL.\n");

	if (!pd->power_on)
		dev_info(&mdnie->bd->dev, "power_on is NULL.\n");
	else
		pd->power_on(NULL, 1);

	if (mdnie->enable) {
		dev_info(&mdnie->bd->dev, "brightness=%d\n", mdnie->bd->props.brightness);
		update_brightness(mdnie);
	}

	mdnie->bd_enable = TRUE;
#endif

	set_mdnie_value(mdnie, 1);

	dev_info(mdnie->dev, "-%s\n", __func__);
	for (i = 0; i < 5; i++) {
		if (negative[i].enable)
			dev_info(mdnie->dev, "pid=%d, %s, %s\n", negative[i].pid, negative[i].comm, negative[i].time);
	}

	return ;
}
Exemplo n.º 9
0
void set_mdnie_pwm_value(struct mdnie_info *mdnie, int value)
{
	mdnie_pwm_control(mdnie, value);
}
Exemplo n.º 10
0
void mdnie_late_resume(struct early_suspend *h)
{
 	u32 i, conversion;
 	struct mdnie_info *mdnie = container_of(h, struct mdnie_info, early_suspend);
#if defined(CONFIG_FB_MDNIE_PWM)
 	struct lcd_platform_data *pd = NULL;
 
 	dev_info(mdnie->dev, "+%s\n", __func__);
 	pd = mdnie->lcd_pd;
 
 	if (mdnie->enable)
 		mdnie_pwm_control(mdnie, 0);
 
 	if (!pd)
 		dev_info(&mdnie->bd->dev, "platform data is NULL.\n");
 
 	if (!pd->power_on)
 		dev_info(&mdnie->bd->dev, "power_on is NULL.\n");
 	else
 		pd->power_on(NULL, 1);
 
 	if (mdnie->enable) {
 		dev_info(&mdnie->bd->dev, "brightness=%d\n", mdnie->bd->props.brightness);
 		update_brightness(mdnie);
 	}
 
 	mdnie->bd_enable = TRUE;
 	dev_info(mdnie->dev, "-%s\n", __func__);
#endif

      printk("[mdnie] %s \n", __func__);

      mdnie_status = MDNIE_RESUME;

 	for (i = 0; i < 5; i++) {
 		if (negative[i].enable){
 			dev_info(mdnie->dev, "pid=%d, %s, %s\n", negative[i].pid, negative[i].comm, negative[i].time);
                   mdnie->negative = NEGATIVE_ON;
 	}
 	}


      //if(NEGATIVE_ON == mdnie->negative)
         mdelay(110);

      set_cabc_value(mdnie, 0);
      set_mdnie_value(mdnie, 0);

      //if(NEGATIVE_ON == mdnie->negative)
        mdelay(30);
 
#if LCD_LOW_TEMP_CONVERSION
        if(lcd_panel_id == LCD_PANEL_DTC){
           if( -50 < get_temp_from_ps_battery()){
         conversion = 0x02;
            }else{
         conversion = 0x01;
            }
        }else{
            if( -50 < get_temp_from_ps_battery()){
                conversion = 0x02;
            }else{
                conversion = 0x01;
            }
         }
      vc_display_bus_write(0,0xB4,&conversion,1);
#endif

 	return ;
}