Received: by 10.213.65.68 with SMTP id h4csp2341026imn; Mon, 9 Apr 2018 01:40:42 -0700 (PDT) X-Google-Smtp-Source: AIpwx48ZEsaYlqb2TVZ9jIUQUP1M1aP0fPMlY0vHjKUPOLPFdGU0mxH7gfGkB8FJmGauPkxTc7Gi X-Received: by 10.101.99.66 with SMTP id p2mr8853504pgv.396.1523263242439; Mon, 09 Apr 2018 01:40:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523263242; cv=none; d=google.com; s=arc-20160816; b=b7EIRI0NPN/Lbk9XE+n4gVEvQX+vbFLiqERLIrnz3UVvo9It3VMQGrlRtRpiBylhFv +E+FI1aD8vCEO3EWRjuzh61amuN6Cbh+CoFOcqynEkfKLwE/YzzuLqxEZBsR20FskS0Y VA8/kReiaJUI9B/8fF+wsKeGDhF3gsPLRm2GmnaaLaO7d6XivJnVJItG+l6hS4PLs4dH Hkya2cHbQs56QK2mZRZU/mTheJX5FB/36SanPL+dViTOM7Lrea4+n7XXIz1cN3jfNS9a AWWrwIimZ0RKGg7ca5jM4RlteO8e0yS/f/TJmwVH1BYHZbTpPCfFqJANViNViv6Mkjdn mnuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=NTwg0b8hsIW5lGiVR/TskzArezljOvs3f3PzWUqaD8o=; b=nDFqMQTpAZHkZJnQxj6DpuBhHyDSZU4H9zjEvHhpjsqB6cyumrQIXR/mVWsnPbeFCU qcMrQ2UnSoa328bpAOjQG9uERK5EL/J/cP4g1MouAruwOdNQMgw32fzuCUr9uAd5GcnL crV1qSJiX7h+p7vkzxpA9ZdNHiyWftw9HwHKTt+rhrXdL4hKWVYDTehdxvAGaHfLZR2P +bFbZrssvULgRYp+dLfli7EmarRQze2w0pVLsNKlSaBcsmvi+dqfHLPwVE0/0cThzF/v O0bqKmnYPTMBxyuL6AnKAgD+8RXmLm/uaE2+uuekwV7/cFZSwFE/CbVUmXkJfw5z+Aw3 ao6w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f89-v6si14466270plf.488.2018.04.09.01.40.05; Mon, 09 Apr 2018 01:40:42 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752401AbeDIIdr (ORCPT + 99 others); Mon, 9 Apr 2018 04:33:47 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:57806 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752286AbeDIIdm (ORCPT ); Mon, 9 Apr 2018 04:33:42 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 39390273127 From: Enric Balletbo i Serra To: Daniel Thompson , Doug Anderson , Pavel Machek , Rob Herring , Lee Jones Cc: Jingoo Han , Richard Purdie , Jacek Anaszewski , Brian Norris , Guenter Roeck , Alexandru Stan , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com Subject: [RESEND PATCH v3 0/4] backlight: pwm_bl: support linear interpolation and brightness to human eye Date: Mon, 9 Apr 2018 10:33:29 +0200 Message-Id: <20180409083333.1249-1-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.16.3 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dear all, This series is a third patchset (resend )integrating the requested changes. The first and second patch what tries to solve is the problem of granularity for high resolution PWMs. The idea is simple interpolate between 2 brightness values so we can have a high PWM duty cycle (a 16 bits PWM is up to 65535 possible steps) without having to list out every possible value in the dts. I think that this patch is required to not break backward compatibility, to be more flexible and also extend the functionality to be able to use high resolution PWM with enough steps to have a good UI experience in userspace. The thirth and fourth patch is a bit more ambicious, the idea is let decide the driver the brightness-levels required in function of the PWM resolution. To do this create a brightness-levels table filled with the CIE 1931 algorithm values to convert brightness to PWM duty cycle. More detailed info is available in the commit message of every patch. Both functionalities were tested on a Samsung Chromebook Plus (that has a 16 bits PWM) and a SL50 device (with a 8 bits PWM) Waiting for your feedback. Best regards Enric Balletbo i Serra (4): backlight: pwm_bl: linear interpolation between brightness-levels dt-bindings: pwm-backlight: add a num-interpolation-steps property. backlight: pwm_bl: compute brightness of LED linearly to human eye. dt-bindings: pwm-backlight: move brightness-levels to optional. .../bindings/leds/backlight/pwm-backlight.txt | 34 ++- drivers/video/backlight/pwm_bl.c | 232 +++++++++++++++++++-- 2 files changed, 246 insertions(+), 20 deletions(-) -- 2.16.3