Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp364065ybe; Mon, 2 Sep 2019 02:54:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqxsLRRki2tEdcjhpwG8tZq+28WEZL5cgQ3z0Dz6tnfc0wXUPFXiEl1vJVvTGoUGNkZ/IrDj X-Received: by 2002:a63:b64:: with SMTP id a36mr24990541pgl.215.1567418071222; Mon, 02 Sep 2019 02:54:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567418071; cv=none; d=google.com; s=arc-20160816; b=O5Txt9L6BG5Crgw4jjpsb+AKk+xS9zaDyIisUROcAobBmvO9JJxld0gXflVThmkIp2 nF4BKal1H4GgM4l5adB/HoAeTLqoKSKasWSNjQ/W0hU0NyeVQ33kIY55TvpvKhJGm2IY zWHh7hhCK5S7uBKRAXawaSkVzRcwJL/YT2lhcYroGuZaxs8KaqMlPXt8CBm+1zIMcVj1 QpeHUawExyl5+W6vAdoN8wu3GkWLUYfGbZOMICDNSf1noiS2fafu3/SraxTVe/eArpHt 3F3H5GHxU1xl6NbTKdOwN4LOo8HVYlLkrdpdg4Fol+zoyPqnZToe0x6SQRS6zjFuKSid qI/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=XEaajhYL2DDcNnig232ycVZm5Az7zzGM6juW3JXG9yQ=; b=M6LN6yriH59We6u5y8CTQdDiDkOV3ztyzg+DqcJ3Hz7xnHU/4VMxObQg3b5GjEJe7J 4fl6H6eGOvqG9q4qa5f9B8bl2rwlMhMNINO1aHY7Wan6QcNaJ3Lp6RxSgVzAnXvfNAYi ni/94h5N0ZAioBat5MpjJYhQM88Zlx5slKyFzHWq8DSNdNWmTE3Z36V0pCJFCdsQMpk0 J6kKQt0opiy3D2hO2ytPewtr+/ZnscnMoK6mv9FWhYolu6Cqdk3aGjKjNmEaT/odV89+ lfGZTSbnlSWx/1zP1Bh73jLBw008RAZLHWXFsa3Mh/QxPitc7MlYsFZorX5TwtbFX4t1 yT7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="a/f0r3wh"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i187si13618067pfe.21.2019.09.02.02.54.16; Mon, 02 Sep 2019 02:54:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="a/f0r3wh"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731302AbfIBJlm (ORCPT + 99 others); Mon, 2 Sep 2019 05:41:42 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:41562 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731294AbfIBJll (ORCPT ); Mon, 2 Sep 2019 05:41:41 -0400 Received: by mail-wr1-f65.google.com with SMTP id j16so13284936wrr.8 for ; Mon, 02 Sep 2019 02:41:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=XEaajhYL2DDcNnig232ycVZm5Az7zzGM6juW3JXG9yQ=; b=a/f0r3wh1i2nTAvJVAJBZEoLNeDpRYSXvLUG800eabb6+vAM1Piy+0FYiXbkWJS4on aywDOCMGNAhoBqPGDYyF+qGX2MgbkO8+mFR9K0wa5ChpvAgCDdzrq9vMq5dxnIhF+0yf N1vkx4pEtz5FJsNy3IIZoe3eMtE5GJBw9V3pdcQrBLYSshV3ucgoY6rq5hvTd+BWrteQ ZF8RYGsso3WxK/1Jp841Xpgz5qdpswdGBggqH3JmJxaYM3g3Hx0XAQYucE7PREvRuj9X kG60QBVhiW/tOtPkagKKds9jkvxyfjfCSXna7SOZDdD925Sq37LrwNctNNT8h4i04gaH G3Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=XEaajhYL2DDcNnig232ycVZm5Az7zzGM6juW3JXG9yQ=; b=RTm6rrUfVzqhFvY73uqqIM+qNk5N39ldlRzP56pW/nfhrY24dvCc0ywtKHQFhIsdX8 hISQHRLeW/8Hw4JFUGa6xDSdf+dgrA24iWwqWBapIreS2dEcYhUkuWsIIGfwlOZOgS+M 39Eq0gGlo3ToDFlD8gnWABHMOWHzjI2btUqZposXeLPh0L6OYp2t5hcYB63Im/kWY8ZM Psp4NBS4hfNQ874Fok74E7rdFA0WQTE/9VCpLuQI4iVlls0s+e0qOwwhLK1rSrvnqKNv HZrzUL2YsytHKLJ8oUpbgoMV+13s+2u+hYw4mghZYGDMGNej2t8CpliiehlOFXFkkemG 4GqA== X-Gm-Message-State: APjAAAWw9XnqlOVMK4J/806BWwsq1xQNiphfbPk6r69GLgy3vBYfPPSy jwnGadTDoUxd8AC7+s0xiLMXoA== X-Received: by 2002:adf:e603:: with SMTP id p3mr4027156wrm.102.1567417299891; Mon, 02 Sep 2019 02:41:39 -0700 (PDT) Received: from dell ([95.147.198.93]) by smtp.gmail.com with ESMTPSA id g201sm11439111wmg.34.2019.09.02.02.41.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 02 Sep 2019 02:41:39 -0700 (PDT) Date: Mon, 2 Sep 2019 10:41:37 +0100 From: Lee Jones 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 Subject: Re: [PATCH v3 2/4] backlight: Expose brightness curve type through sysfs 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190709190007.91260-3-mka@chromium.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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