void lm3630_lcd_backlight_set_level(int level) { if (!lm3630_dev) { pr_warn("%s: No device\n", __func__); return; } pr_debug("%s: level=%d\n", __func__, level); if (level) lm3630_backlight_on(lm3630_dev, level); else lm3630_backlight_off(lm3630_dev); }
void lm3630_lcd_backlight_set_level(int level) { if (level > MAX_BRIGHTNESS_LM3630) level = MAX_BRIGHTNESS_LM3630; if (lm3630_i2c_client != NULL) { if (level == 0) { lm3630_backlight_off(); } else { lm3630_backlight_on(level); } } else { pr_err("%s(): No client\n", __func__); } }