Skip to content
Commit c0b64faf authored by Matthias Kaehlcke's avatar Matthias Kaehlcke Committed by Lee Jones
Browse files

backlight: pwm_bl: Set scale type for brightness curves specified in the DT



Check if a brightness curve specified in the device tree is linear or
not and set the corresponding property accordingly. This makes the
scale type available to userspace via the 'scale' sysfs attribute.

To determine if a curve is linear it is compared to a interpolated linear
curve between min and max brightness. The curve is considered linear if
no value deviates more than +/-5% of ${brightness_range} from their
interpolated value.

Signed-off-by: default avatarMatthias Kaehlcke <mka@chromium.org>
Acked-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 511a2046
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment