static int bl_set_intensity(struct backlight_device *bd) { int brightness = bd->props.brightness; lm3533_lcd_backlight_set_level(brightness); return 0; }
static int lm3533_bl_set_intensity(struct backlight_device *bd) { struct i2c_client *client = to_i2c_client(bd->dev.parent); dev_dbg(&client->dev, "set_intensity = %d\n", bd->props.brightness); lm3533_lcd_backlight_set_level(client, bd->props.brightness); return 0; }
static int lm3533_bl_resume(struct i2c_client *client) { #if defined(CONFIG_FB_MSM_MIPI_LGIT_CMD_WVGA_INVERSE_PT_PANEL) || \ defined(CONFIG_FB_MSM_MIPI_LGIT_VIDEO_WVGA_INVERSE_PT_PANEL) lm3533_lcd_backlight_set_level(saved_main_lcd_level); #else lm3533_backlight_on(saved_main_lcd_level); #endif return 0; }
void lm3533_early_suspend(struct early_suspend * h) { is_early_suspended = true; pr_info("%s[Start] backlight_status: %d\n", __func__, backlight_status); if (backlight_status == BL_OFF) return; lm3533_lcd_backlight_set_level(0); }
void lm3533_late_resume(struct early_suspend * h) { is_early_suspended = false; pr_info("%s[Start] backlight_status: %d\n", __func__, backlight_status); if (backlight_status == BL_ON) return; lm3533_lcd_backlight_set_level(requested_in_early_suspend_lcd_level); return; }
static int mipi_lgit_backlight_level(int level, int max, int min) { #if defined (CONFIG_BACKLIGHT_LM3530) lm3530_lcd_backlight_set_level(level); #elif defined (CONFIG_BACKLIGHT_LM3533) lm3533_lcd_backlight_set_level(level); #elif defined (CONFIG_BACKLIGHT_LM3630) lm3630_lcd_backlight_set_level(level); #endif return 0; }
static int lm3533_bl_suspend(struct i2c_client *client, pm_message_t state) { printk(KERN_INFO"%s: new state: %d\n", __func__, state.event); #if defined(CONFIG_FB_MSM_MIPI_LGIT_CMD_WVGA_INVERSE_PT_PANEL) || \ defined(CONFIG_FB_MSM_MIPI_LGIT_VIDEO_WVGA_INVERSE_PT_PANEL) || \ !defined(CONFIG_HAS_EARLYSUSPEND) lm3533_lcd_backlight_set_level(saved_main_lcd_level); #else lm3533_backlight_off(h); #endif return 0; }
static ssize_t lm3533_bl_store_lvl(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { int level; struct i2c_client *client = to_i2c_client(dev); if (!count) { dev_err(&client->dev, "Invalid argument while storing level\n"); return -EINVAL; } level = simple_strtoul(buf, NULL, 10); lm3533_lcd_backlight_set_level(client, level); return count; }