Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8266121ybi; Tue, 9 Jul 2019 12:16:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzje/xHrEdPAMv+Df0w14bXQbfOhby5Nwgyp6e7gPLeouur3mbDe1vZJL9Rei20vvOBkeCE X-Received: by 2002:a17:902:9898:: with SMTP id s24mr33291313plp.226.1562699765867; Tue, 09 Jul 2019 12:16:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562699765; cv=none; d=google.com; s=arc-20160816; b=wTwncLRhrgKV1bqZKmekoGLmLmOldKHMvAaQlkAiMkBi+XVYE24jDp/aB9gDansCLh HdpBGBQyUShgXY/Xk2AebGf3FTa4iiqeKDsRcZcSjlrgUaXq22y9Gj2NyhM1wfNJBvn9 XWiF6CUOwvafs0P3sgVeb2nQRmFYpoh6jPyECmhQZbHH+/x1a72JggXVPwMaYYNTYYMW o54EMJwIiwgeCP2aTxzvDN4Z+m717YUicxWfzmMMxr/O1LS+ZMuAn8mdJOMHddfBTRIh plZQMhY+qjyGEf4p3xeADXLy2Cz/L+eHdDeo/jnUyvZvRL1W1DKFYWFrB3WYNfWbev1L ay8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=agNl784XHpZcC5LqJknrXQYgxU0CtqquUElpKGVsi2U=; b=oPl2tvIuyLVsgb0Rosb/WYvwpkG71kIRJ7DdRfAUVM/jujYGFizAVtf5AJw4guTNvh Rp9Th4Hct/iLnK9COU6Cwu7orV8Hbi3z1mp+0ecN8MFCGMCkBgodgEIl1Xd3sudmZ9AF N4HRE9DO2OnGbRnXCISEv+W38Hln/ccW5q89MaAcIaX0WLrQgKBmFxf4GqvAa6+WfJFz fwUUUhVYusV6JojXH6a6JtJVVZe7St9SHrzRY6h8AavMytW9fdNfMIXoIlWMGU3ARG29 dRksQxekTOwVqFuweGICIM6taq/+Ev0JNjzHLqjx+lEiwePF4TvToDCFexGwBmbDjgek jMKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mM+cViIx; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a17si24730859pfa.45.2019.07.09.12.15.49; Tue, 09 Jul 2019 12:16:05 -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=@chromium.org header.s=google header.b=mM+cViIx; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727086AbfGITAN (ORCPT + 99 others); Tue, 9 Jul 2019 15:00:13 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:39959 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726491AbfGITAN (ORCPT ); Tue, 9 Jul 2019 15:00:13 -0400 Received: by mail-pg1-f193.google.com with SMTP id w10so9910852pgj.7 for ; Tue, 09 Jul 2019 12:00:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=agNl784XHpZcC5LqJknrXQYgxU0CtqquUElpKGVsi2U=; b=mM+cViIx9xyiXexrT0Zh5UFoRyGLEmGjKHq5xGLVtu+6hX2D9Xflb35m087yPOGTEv 2Xd3YFtFbsxce06tMJnfUqCnxvQ8BI99jPS6rnPRrckKhk2lty/H/3JDLY34nN0jGr+0 Jhznan7TeSV+j2PqhnFvH4vf4Y2JUaaRQLcvs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=agNl784XHpZcC5LqJknrXQYgxU0CtqquUElpKGVsi2U=; b=V0+1EzXssE3rnJP1dRdvf4wh2qo33IUeM+jrnZIZv7qduMtaXW8wDyQ2DPJbsSoI9C Kh82OZM6hlw07rK8xJGjAtOxDKzpprt+zBWB4MITRP2hXxTd1Xbc6JCdYm7I3d1sdlNu hyz2rVOfIOrwSGDHiPppgy12O2ail8Uhcwy0ZUbM2lHFXBA6vR0X3LioqP7xNf/7DFdF g45Oi6/zTiBOgJLUYffg/uAKXr9YFF7eYXMqlWDiQgSaGcLK7oJ+ys6Nh5VcUSfM0743 TjEtmO851Uf30P7Rso6UeRBSbDA/1DtZUsrYq9/vuxxyV9GOETvc+eMXOLW3fCu3Fd3h sYhw== X-Gm-Message-State: APjAAAWBW4aXG67pgobFm6ftIYCAnaIBDG/63KDwIpxG0kxlQiSB+LjL wBpuK6w3ag4bRAjMWzWikVY1iQ== X-Received: by 2002:a63:1658:: with SMTP id 24mr33215318pgw.167.1562698812609; Tue, 09 Jul 2019 12:00:12 -0700 (PDT) Received: from localhost ([2620:15c:202:1:75a:3f6e:21d:9374]) by smtp.gmail.com with ESMTPSA id x26sm22747410pfq.69.2019.07.09.12.00.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jul 2019 12:00:12 -0700 (PDT) From: Matthias Kaehlcke To: Thierry Reding , Lee Jones , Daniel Thompson , Jingoo Han , Bartlomiej Zolnierkiewicz Cc: 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 , Matthias Kaehlcke Subject: [PATCH v3 0/4] backlight: Expose brightness curve type through sysfs Date: Tue, 9 Jul 2019 12:00:03 -0700 Message-Id: <20190709190007.91260-1-mka@chromium.org> X-Mailer: git-send-email 2.22.0.410.gd8fdbe21b5-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 is currently opaque to userspace, so userspace often relies on 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 a new sysfs attribute. Matthias Kaehlcke (4): MAINTAINERS: Add entry for stable backlight sysfs ABI documentation backlight: Expose brightness curve type through sysfs backlight: pwm_bl: Set scale type for CIE 1931 curves backlight: pwm_bl: Set scale type for brightness curves specified in the DT .../ABI/testing/sysfs-class-backlight | 26 ++++++++++++++ MAINTAINERS | 2 ++ drivers/video/backlight/backlight.c | 19 ++++++++++ drivers/video/backlight/pwm_bl.c | 35 ++++++++++++++++++- include/linux/backlight.h | 8 +++++ 5 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 Documentation/ABI/testing/sysfs-class-backlight -- 2.22.0.410.gd8fdbe21b5-goog