예제 #1
0
static void cmc623_pwm_early_resume(struct early_suspend *h)
{
	struct backlight_device *bd = platform_get_drvdata(bl_pdev);

	cmc623_pwm_suspended = 0;

	cmc623_pwm_gpio_init();

	cmc623_pwm_send_intensity(bd);
	return 0;
}
예제 #2
0
static void cmc623_pwm_early_resume(struct early_suspend *h)
{
	struct backlight_device *bd = platform_get_drvdata(bl_pdev);

	//bd->props.brightness = cmc623_pwm_DEFAULT_INTENSITY;
	cmc623_pwm_suspended = 0;

	cmc623_pwm_gpio_init();
		
	cmc623_pwm_send_intensity(bd);
	return 0;
}
예제 #3
0
static int cmc623_pwm_probe(struct platform_device *pdev)
{
	struct backlight_properties props;
	struct backlight_device *bd;

	pr_info("cmc623_pwm Probe START!!!\n");

	bd = backlight_device_register("pwm-backlight", &pdev->dev, pdev, &cmc623_pwm_ops, &props);

	if (IS_ERR(bd))
		return PTR_ERR(bd);

	platform_set_drvdata(pdev, bd);

	bd->props.max_brightness = CMC623_PWM_MAX_INTENSITY;

	if(system_rev>=12)
		bd->props.brightness = CMC623_PWM_DEFAULT_INTENSITY_AFTER_HW12;
	else
		bd->props.brightness = CMC623_PWM_DEFAULT_INTENSITY;

	cmc623_pwm_gpio_init();

//	s5p_mdine_pwm_enable(1);

//	cmc623_pwm_set_intensity(bd);

	dev_info(&pdev->dev, "cmc623_pwm backlight driver is enabled.\n");

	bl_pdev = pdev;

#ifdef CONFIG_HAS_EARLYSUSPEND
	//st_early_suspend.level = EARLY_SUSPEND_LEVEL_BLANK_SCREEN + 1;
	st_early_suspend.level =	EARLY_SUSPEND_LEVEL_DISABLE_FB-3;
	st_early_suspend.suspend = cmc623_pwm_early_suspend;
	st_early_suspend.resume = cmc623_pwm_early_resume;
	register_early_suspend(&st_early_suspend);
#endif	/* CONFIG_HAS_EARLYSUSPEND */

	pr_info("cmc623_pwm Probe END!!!\n");
	return 0;

}
예제 #4
0
static int cmc623_pwm_probe(struct platform_device *pdev)
{
	struct backlight_device *bd;

	printk("cmc623_pwm Probe START!!!\n");

	bd = backlight_device_register("s5p_bl", &pdev->dev, pdev, &cmc623_pwm_ops);

	if (IS_ERR(bd))
		return PTR_ERR(bd);

	platform_set_drvdata(pdev, bd);

	bd->props.max_brightness = CMC623_PWM_MAX_INTENSITY;
	bd->props.brightness = CMC623_PWM_DEFAULT_INTENSITY;

	cmc623_pwm_gpio_init();

//	s5p_mdine_pwm_enable(1);

//	cmc623_pwm_set_intensity(bd);

	dev_info(&pdev->dev, "cmc623_pwm backlight driver is enabled.\n");

	bl_pdev = pdev;

#ifdef CONFIG_HAS_EARLYSUSPEND
	st_early_suspend.level = EARLY_SUSPEND_LEVEL_BLANK_SCREEN + 1;
	st_early_suspend.suspend = cmc623_pwm_early_suspend;
	st_early_suspend.resume = cmc623_pwm_early_resume;
	register_early_suspend(&st_early_suspend);
#endif	/* CONFIG_HAS_EARLYSUSPEND */

#ifdef CONFIG_FB_S3C_MDNIE
//	init_mdnie_class();  //set mDNIe UI mode, Outdoormode
#endif

	printk("cmc623_pwm Probe END!!!\n");
	return 0;

}
예제 #5
0
static int cmc623_pwm_probe(struct platform_device *pdev)
{
	struct backlight_device *bd;
	struct backlight_properties props;

	printk("+++ cmc623_pwm Probe START!!!\n");

	bd = backlight_device_register("omap_bl", &pdev->dev, pdev, &cmc623_pwm_ops, &props);

	if (IS_ERR(bd))
		return PTR_ERR(bd);

	platform_set_drvdata(pdev, bd);

	bd->props.max_brightness = CMC623_PWM_MAX_INTENSITY;
	bd->props.brightness = CMC623_PWM_DEFAULT_INTENSITY;
	bd->props.power = FB_BLANK_UNBLANK;
	bd->props.fb_blank = FB_BLANK_UNBLANK;

	cmc623_pwm_gpio_init();

//	s5p_mdine_pwm_enable(1);

//	cmc623_pwm_set_intensity(bd);

	dev_info(&pdev->dev, "cmc623_pwm backlight driver is enabled.\n");

	bl_pdev = pdev;

#ifdef CONFIG_HAS_EARLYSUSPEND
	st_early_suspend.level = EARLY_SUSPEND_LEVEL_BLANK_SCREEN + 1;
	st_early_suspend.suspend = cmc623_pwm_early_suspend;
	st_early_suspend.resume = cmc623_pwm_early_resume;
	register_early_suspend(&st_early_suspend);
#endif	/* CONFIG_HAS_EARLYSUSPEND */
	printk("--- cmc623_pwm Probe END!!!\n");
	return 0;

}