Lines Matching +full:abs +full:- +full:range
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>
26 int i, flat, count, range = (max - min); in pmu_backlight_init_curve() local
35 bl_curve[flat + i] = min + (range * (i + 1) / count); in pmu_backlight_init_curve()
40 int level = (FB_BACKLIGHT_LEVELS - 1); in pmu_backlight_curve_lookup()
49 int diff = abs(bl_curve[i] - value); in pmu_backlight_curve_lookup()
75 int level = bd->props.brightness; in __pmu_backlight_update_status()
78 if (bd->props.power != FB_BLANK_UNBLANK || in __pmu_backlight_update_status()
79 bd->props.fb_blank != FB_BLANK_UNBLANK) in __pmu_backlight_update_status()
162 props.max_brightness = FB_BACKLIGHT_LEVELS - 1; in pmu_backlight_init()
172 level = bd->props.max_brightness; in pmu_backlight_init()
182 bd->props.max_brightness / 15); in pmu_backlight_init()
185 bd->props.brightness = level; in pmu_backlight_init()
186 bd->props.power = FB_BLANK_UNBLANK; in pmu_backlight_init()