static void cmc623_pwm_early_suspend(struct early_suspend *h) { struct backlight_device *bd = platform_get_drvdata(bl_pdev); cmc623_pwm_suspended = 1; cmc623_pwm_send_intensity(bd); }
static int cmc623_pwm_set_intensity(struct backlight_device *bd) { //printk("BD->PROPS.BRIGHTNESS = %d\n", bd->props.brightness); cmc623_pwm_send_intensity(bd); return 0; }
static int cmc623_pwm_suspend(struct platform_device *swi_dev, pm_message_t state) { struct backlight_device *bd = platform_get_drvdata(swi_dev); cmc623_pwm_suspended = 1; cmc623_pwm_send_intensity(bd); return 0; }
static int cmc623_pwm_resume(struct platform_device *swi_dev) { struct backlight_device *bd = platform_get_drvdata(swi_dev); bd->props.brightness = CMC623_PWM_DEFAULT_INTENSITY; cmc623_pwm_suspended = 0; cmc623_pwm_send_intensity(bd); return 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_send_intensity(bd); }
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; }
static int cmc623_pwm_set_intensity(struct backlight_device *bd) { //printk("BD->PROPS.BRIGHTNESS = %d\n", bd->props.brightness); cmc623_pwm_send_intensity(bd); if (first_brightness_setting) { first_brightness_setting = 0; qt602240_inform_first_brightness(); } return 0; }
static void cmc623_pwm_early_resume(struct early_suspend *h) { struct backlight_device *bd = platform_get_drvdata(bl_pdev); // if (lcd_type == LCD_TYPE_TN) bd->props.brightness = 4; cmc623_pwm_suspended = 0; // cmc623_pwm_gpio_init(); cmc623_pwm_send_intensity(bd); return 0; }
static int cmc623_pwm_remove(struct platform_device *pdev) { struct backlight_device *bd = platform_get_drvdata(pdev); #ifdef CONFIG_HAS_EARLYSUSPEND unregister_early_suspend(&st_early_suspend); #endif /* CONFIG_HAS_EARLYSUSPEND */ bd->props.brightness = 0; bd->props.power = 0; cmc623_pwm_send_intensity(bd); backlight_device_unregister(bd); return 0; }