#define UNKNOWN_STR "unknown"
static struct _backlight_ops backlight_ops;
-static int force_brightness;
static bool display_dev_available = false;
static const struct display_config *display_conf;
}
}
-static int set_force_brightness(int level)
-{
- if (level < 0 || level > PM_MAX_BRIGHTNESS)
- return -EINVAL;
-
- force_brightness = level;
-
- return 0;
-}
-
static int set_brightness(int val)
{
int max, ret;
- int default_brightness = 0;
+ int default_brightness = 0, force_brightness = 0;
display_backlight_get_default_brightness(&default_brightness);
+ display_backlight_get_force_brightness(&force_brightness);
if (!display_dev_available) {
_E("There is no display device.");
static struct _backlight_ops backlight_ops = {
.get_lcd_power = dpms_get_cached_state,
- .set_force_brightness = set_force_brightness,
.set_brightness = set_brightness,
.get_brightness = get_brightness,
.restore_brightness_func = restore_brightness_func,