Received: by 10.223.176.46 with SMTP id f43csp3987386wra; Tue, 23 Jan 2018 02:22:42 -0800 (PST) X-Google-Smtp-Source: AH8x227HNQjjZhgzGKXH2s3trUWbX9lCM8y5jxdSrtg8N7rnlufTncQ4Bq8WnJpYDFR9HHHSaRks X-Received: by 10.98.147.154 with SMTP id r26mr9987420pfk.207.1516702962143; Tue, 23 Jan 2018 02:22:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516702962; cv=none; d=google.com; s=arc-20160816; b=i4msY60GETbbk7rYXTgdyqKSe3pHYVTEWl0RbUuZdo28IGCNgTi/aUUOgVdvITwwjY Nt96ELDaG3Qg7B5NcwXS9cjkji+z3pQdRBfqwS/pknlezPlLEzCu8K7FKWdPpDJ/K0gf qKjkOeXdf77P9oE3vRpBdGEblCby7cH3zRiSzUsyJrJcjzZPWB+cYz8CeB+ShSRUalK1 J4IZHriDBIHvbaYPWzZL/KoS/2710gcbEVlmSFkhOfBzAKDItdQEUN8UEk4dnyiX44X7 N9Zdsd+W/w3LJ/r+3bP4IqZ+IY2JQKQ2px2FHdaNG69jEGbAmYJ15leJnuflKyRKmd0f VjKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=WWA9B4wpLEVNy+3QbxL+H8Yt2JcDhI4c0r3Qpo0MqZg=; b=zXB2qYg6tDY/RNzcgjV7CarCujrW6nGHAaWDIEz3AjeUvlW1cE48gjIlys9nAwVqe+ YRGOs9kgzMyfEAuJiQFadpqimQQ57xL3AFErRnyJv35y6PTwlZtT2Tdl2mS07suJWOFN /tH+8ndLwkLmYtlgYFcZBikMtxz46QQc3BSQYiOqF2Qc+fm97wLf8YCfRgKRimBFR0zL Q3ZD+2jmp82/sjhXEgEeJRjG4lxdxP2L+my6hP1HzMHZwWq26xXtY3AqqvxPM1+/jIvR I6PJTMWg4RmKeqie4zJX5zevEgyjg3zOwtu7NMu+K5TsMn81/hTLUR/lllUaa5zGMvtH 2jGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=B6Tv06HY; 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=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w8si14617503pgc.754.2018.01.23.02.22.28; Tue, 23 Jan 2018 02:22:42 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=B6Tv06HY; 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=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751359AbeAWKWB (ORCPT + 99 others); Tue, 23 Jan 2018 05:22:01 -0500 Received: from mail-qt0-f196.google.com ([209.85.216.196]:46015 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751154AbeAWKV6 (ORCPT ); Tue, 23 Jan 2018 05:21:58 -0500 Received: by mail-qt0-f196.google.com with SMTP id x27so28339470qtm.12; Tue, 23 Jan 2018 02:21:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=WWA9B4wpLEVNy+3QbxL+H8Yt2JcDhI4c0r3Qpo0MqZg=; b=B6Tv06HYoaNTsew7ymuQ2k7OdYscjq1GGMsZy0fMgHuUWtMmkJpat0GPMWTdHopWV3 720buevrnboN49qdeyg5WOYLbt3v3LrloowGinqwhoL0kj6WjBKpl/FSzbKLZTw0abEq XizXT7+rDUj8WYcwqjoPhSxh1DmHKPIes+wXYV4e5oijiY3J0zaMVWucz356LCC0Nt9D iuT9m5E0FEsnGGru6l42XCe7Gt1UZ7FrMMkN2FJ1c+S41Yo+xRaI7GIQc7vOYR4hxYPo Bvnqwb/N3xttZ4zsFxfDa5a3Ri7qI+wnSfPfYIwTrHdZlYYJtZbwqR3IWaffgzk4Rz5N Fjtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=WWA9B4wpLEVNy+3QbxL+H8Yt2JcDhI4c0r3Qpo0MqZg=; b=kRNSj7dfuCwKsnDrLym8a2NpBsukuShQndQ9Y2/bPHbTYnWtVXb2xWAwRYvwRrU8gQ 4LhkZzvqM4dyCCpWf8FMSyxWJjlD/g3LIORxO7WukQTmJ5tiqSzqd9LcjRFgJmD7Flrc cJ7oVQuH2WeZPEv1GQr9kY7WMicIxaIIpSm4PgRYog0iwrJ4Nc22ISrHrdHGmXuzfXR0 Zx1qGYsYn417yjODqEkzm5USvqSpa8WCuf6pWt8CyyilgAMonmNMFtbHvfsWw+Irc22l PipsMBNYOGpAiHEjEFxiaImPvZlbJSEWy6+eO9nu/ONCp+4fKmGXvyxcnlkA3tw4gEY0 MnfA== X-Gm-Message-State: AKwxytcUE+NSIV7KoyiRniLag5PKrzWKX4AZyF1tE3O61zAjYTEG5JU9 ebLeokW5L+OLUWW2eFgQUT71XD23cEGjtxICSz0= X-Received: by 10.237.40.97 with SMTP id r88mr2809885qtd.233.1516702917690; Tue, 23 Jan 2018 02:21:57 -0800 (PST) MIME-Version: 1.0 Received: by 10.200.26.27 with HTTP; Tue, 23 Jan 2018 02:21:57 -0800 (PST) In-Reply-To: <20180122091613.oyjjzwci3mmfc7j2@oak.lan> References: <20180110223046.17696-1-enric.balletbo@collabora.com> <20180110223046.17696-3-enric.balletbo@collabora.com> <20180119205249.fcbdyu6652ffsdmg@rob-hp-laptop> <20180122091613.oyjjzwci3mmfc7j2@oak.lan> From: Enric Balletbo Serra Date: Tue, 23 Jan 2018 11:21:57 +0100 Message-ID: Subject: Re: [PATCH 2/4] dt-bindings: pwm-backlight: add a num-interpolation-steps property. To: Daniel Thompson Cc: Rob Herring , Enric Balletbo i Serra , Doug Anderson , Pavel Machek , Jingoo Han , Richard Purdie , Jacek Anaszewski , Brian Norris , Guenter Roeck , Lee Jones , Alexandru Stan , linux-leds@vger.kernel.org, "devicetree@vger.kernel.org" , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-01-22 10:16 GMT+01:00 Daniel Thompson : > On Fri, Jan 19, 2018 at 02:52:49PM -0600, Rob Herring wrote: >> On Wed, Jan 10, 2018 at 11:30:44PM +0100, Enric Balletbo i Serra wrote: >> > 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 >> > --- >> > .../bindings/leds/backlight/pwm-backlight.txt | 21 +++++++++++++++++++++ >> > 1 file changed, 21 insertions(+) >> > >> > diff --git a/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt b/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt >> > index 310810906613..605432c910c5 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,19 @@ 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 65535>; >> > + num-interpolated-steps = <4096>; >> >> How does this make sense with only 2 defined levels other than having >> fewer steps? I thought the purpose of this was to have a piecewise >> linear curve. > > It's not wrong as such, this is how a device with a linear (or nearly > linear) response could be compactly described. > > Nevertheless I agree! An example with a small but realistic curve > would be better... we know that copy 'n paste exists so I'd rather > see a simple curve than no curve. > Makes sense, I'll put a better example on next series. Thanks for the review. - Enric > > Daniel. > > >> > + default-brightness-level = <6>; >> >> Aren't valid values 0, 16, 32, 48, etc.? >> >> Rob