Received: by 10.213.65.68 with SMTP id h4csp2340350imn; Mon, 9 Apr 2018 01:39:48 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/w+TPR0Bvnh//ovpmNjWQZJqSXo0eFJUM1E3nh3QwIMecq3v3e+JdNCwDB9mENbPnc1Zvs X-Received: by 10.101.67.13 with SMTP id j13mr24267486pgq.432.1523263188361; Mon, 09 Apr 2018 01:39:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523263188; cv=none; d=google.com; s=arc-20160816; b=a++MTDL3J2GCUL7IYdxr/8hIvwTX0E6Yl5OopBtJWgkARz14oTQf5oyrUr42euAbOf y9VnTIqOIIoGv9OKXgmeFPbL2i76ASayzNC8MvRBQ34nl3DjEz4aVCI1JFMzQdoZ2SUP hkD1s9Zg9PnkXU0MoQYGnxFibKMApaqeJ3ttwg9nF+dMsSnRXrzEVJyC2Dg/24YcVPVs zj0iFDKVHTZCOoeyndYAomvBrxDKT5uJv8S92o5wUSrhejbCHwKCYhyuewN4Q5edgi4b XHkSfM5uEUDHNbXe09+neLwACYAemBtUy33yfxJNqbCiC5JNZhib/16zZLCYxT4Hl586 fy7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=cExAqi7/39lWSCs0+Z89+4Vcw7P7wCxzHNLHO52PrfI=; b=z95jLVcAOAmwjqlRBfS5g9raihOcc+VbliSTVTlx5itfLWm1Mkh/6KMNLPD5R4Uh/k 4Z17iV3PNba1L+J4ei/kxfhVvet2gidYw15JHJs0PN700K75O/LwBItvqO4dTVeyV5Vv bSaFSN0/L20NPWvUNWnH4ZBGI08HYirk1fBg6fU7fjRM4QeplDD9ssg/I3RvVSp6s9WK 4qDBlPZxt0nW9j0KYQUuzaBitweNMPw2RUVaHFK5kVDuptPhuViyD/JNnt1JagaleEHb NBiahzT6AlKCdcbXtrpTf8vR1yQ7+BV3eUArmXeSSeTkYwIYHSa69mtcT07O439P1U9k VNYA== 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 l74si10856266pga.798.2018.04.09.01.39.11; Mon, 09 Apr 2018 01:39:48 -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 S1752601AbeDIIek (ORCPT + 99 others); Mon, 9 Apr 2018 04:34:40 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:57826 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752296AbeDIIdp (ORCPT ); Mon, 9 Apr 2018 04:33:45 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 810102733A6 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 2/4] dt-bindings: pwm-backlight: add a num-interpolation-steps property. Date: Mon, 9 Apr 2018 10:33:31 +0200 Message-Id: <20180409083333.1249-3-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180409083333.1249-1-enric.balletbo@collabora.com> References: <20180409083333.1249-1-enric.balletbo@collabora.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The num-interpolated-steps property specifies the number of interpolated steps between each value of brightness-level table. This is useful for high resolution PWMs to not have to list out every possible value in the brightness-level array. Signed-off-by: Enric Balletbo i Serra Acked-by: Daniel Thompson Reviewed-by: Rob Herring --- .../bindings/leds/backlight/pwm-backlight.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt b/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt index 310810906613..ce9b5746b774 100644 --- a/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt +++ b/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt @@ -21,6 +21,11 @@ Optional properties: and enabling the backlight using GPIO. - pwm-off-delay-ms: Delay in ms between disabling the backlight using GPIO and setting PWM value to 0. + - num-interpolated-steps: Number of interpolated steps between each value + of brightness-levels table. This way a high + resolution pwm duty cycle can be used without + having to list out every possible value in the + brightness-level array. [0]: Documentation/devicetree/bindings/pwm/pwm.txt [1]: Documentation/devicetree/bindings/gpio/gpio.txt @@ -39,3 +44,17 @@ Example: post-pwm-on-delay-ms = <10>; pwm-off-delay-ms = <10>; }; + +Example using num-interpolation-steps: + + backlight { + compatible = "pwm-backlight"; + pwms = <&pwm 0 5000000>; + + brightness-levels = <0 2048 4096 8192 16384 65535>; + num-interpolated-steps = <2048>; + default-brightness-level = <4096>; + + power-supply = <&vdd_bl_reg>; + enable-gpios = <&gpio 58 0>; + }; -- 2.16.3