From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lee Jones Subject: Re: [PATCH v3 2/4] backlight: Expose brightness curve type through sysfs Date: Mon, 2 Sep 2019 10:41:37 +0100 Message-ID: <20190902094137.GM32232@dell> References: <20190709190007.91260-1-mka@chromium.org> <20190709190007.91260-3-mka@chromium.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Content-Disposition: inline In-Reply-To: <20190709190007.91260-3-mka@chromium.org> Sender: linux-kernel-owner@vger.kernel.org To: Matthias Kaehlcke Cc: Thierry Reding , Daniel Thompson , Jingoo Han , Bartlomiej Zolnierkiewicz , linux-pwm@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Enric Balletbo i Serra , Douglas Anderson , Brian Norris , Pavel Machek , Jacek Anaszewski List-Id: linux-pwm@vger.kernel.org On Tue, 09 Jul 2019, Matthias Kaehlcke wrote: > Backlight brightness curves can have different shapes. The two main > types are linear and non-linear curves. The human eye doesn't > perceive linearly increasing/decreasing brightness as linear (see > also 88ba95bedb79 "backlight: pwm_bl: Compute brightness of LED > linearly to human eye"), hence many backlights use non-linear (often > logarithmic) brightness curves. The type of curve currently is opaque > to userspace, so userspace often uses more or less reliable heuristics > (like the number of brightness levels) to decide whether to treat a > backlight device as linear or non-linear. > > Export the type of the brightness curve via the new sysfs attribute > 'scale'. The value of the attribute can be 'linear', 'non-linear' or > 'unknown'. For devices that don't provide information about the scale > of their brightness curve the value of the 'scale' attribute is 'unknown'. > > Signed-off-by: Matthias Kaehlcke > --- > Feel free to suggest improvements in the documentation :) > > Changes in v3: > - removed composite strings, only keep 'linear', 'non-linear' and > 'unknown' > - updated sysfs attribute documentation > - updated commit message > > Changes in v2: > - changed order of brightness scale enums, explicitly make 'unknown' zero > - minor update of commit message > - deleted excess blank line after 'backlight_scale_types' > - s/curves/curve/ in sysfs doc > --- > .../ABI/testing/sysfs-class-backlight | 26 +++++++++++++++++++ > MAINTAINERS | 1 + > drivers/video/backlight/backlight.c | 19 ++++++++++++++ > include/linux/backlight.h | 8 ++++++ > 4 files changed, 54 insertions(+) > create mode 100644 Documentation/ABI/testing/sysfs-class-backlight Applied, thanks. -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog