# Re: \[PATCH v2 4/4\] backlight: pwm\_bl: Set scale type for brightness curves specified in the DT

- From: Pavel Machek \<hidden\>
- Date: 2019-06-26 14:56:29 
- List: linux-fbdev
- Page: https://ratatoskr.run/linux-fbdev/2019/06/5640913
- Thread: https://ratatoskr.run/linux-pwm/2019/06/5638592/t.md

```text
On Mon 2019-06-24 13:31:13, Matthias Kaehlcke wrote:
> 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.

I don't think this works. Some hardware does takes brightness in perceptual units,
converting it in the LED controller.

									Pavel
```
