Lines Matching +full:abs +full:- +full:flat
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
30 for (flat = 1; flat < (FB_BACKLIGHT_LEVELS / 16); ++flat) in pmu_backlight_init_curve()
31 bl_curve[flat] = min; in pmu_backlight_init_curve()
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()
157 props.max_brightness = FB_BACKLIGHT_LEVELS - 1; in pmu_backlight_init()
167 level = bd->props.max_brightness; in pmu_backlight_init()
177 bd->props.max_brightness / 15); in pmu_backlight_init()
180 bd->props.brightness = level; in pmu_backlight_init()
181 bd->props.power = BACKLIGHT_POWER_ON; in pmu_backlight_init()