Lines Matching +full:brightness +full:- +full:level

1 // SPDX-License-Identifier: GPL-2.0
3 * Backlight code for via-pmu
6 * Copyright (C) 2001-2002 Benjamin Herrenschmidt
7 * Copyright (C) 2006 Michael Hanselmann <linux-kernel@hansmi.ch>
25 int i, flat, count, range = (max - min); in pmu_backlight_init_curve()
39 int level = (FB_BACKLIGHT_LEVELS - 1); in pmu_backlight_curve_lookup() local
48 int diff = abs(bl_curve[i] - value); in pmu_backlight_curve_lookup()
51 level = i; in pmu_backlight_curve_lookup()
54 return level; in pmu_backlight_curve_lookup()
57 static int pmu_backlight_get_level_brightness(int level) in pmu_backlight_get_level_brightness() argument
62 pmulevel = bl_curve[level] * FB_BACKLIGHT_MAX / MAX_PMU_LEVEL; in pmu_backlight_get_level_brightness()
74 int level = bd->props.brightness; in __pmu_backlight_update_status() local
77 if (bd->props.power != FB_BLANK_UNBLANK || in __pmu_backlight_update_status()
78 bd->props.fb_blank != FB_BLANK_UNBLANK) in __pmu_backlight_update_status()
79 level = 0; in __pmu_backlight_update_status()
81 if (level > 0) { in __pmu_backlight_update_status()
82 int pmulevel = pmu_backlight_get_level_brightness(level); in __pmu_backlight_update_status()
105 /* Don't update brightness when sleeping */ in pmu_backlight_update_status()
144 int level, autosave; in pmu_backlight_init() local
161 props.max_brightness = FB_BACKLIGHT_LEVELS - 1; in pmu_backlight_init()
171 level = bd->props.max_brightness; in pmu_backlight_init()
179 level = pmu_backlight_curve_lookup( in pmu_backlight_init()
181 bd->props.max_brightness / 15); in pmu_backlight_init()
184 bd->props.brightness = level; in pmu_backlight_init()
185 bd->props.power = FB_BLANK_UNBLANK; in pmu_backlight_init()