Received: by 10.223.176.46 with SMTP id f43csp2670865wra; Mon, 22 Jan 2018 01:16:58 -0800 (PST) X-Google-Smtp-Source: AH8x226OMSwGfLPgU2gqWqUjXezQkRHCoJWZ0XCGmT75vG3Jvs1antRrn4yS4fv6o/AJRIG10TpI X-Received: by 2002:a17:902:a60d:: with SMTP id u13-v6mr3044736plq.114.1516612618048; Mon, 22 Jan 2018 01:16:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516612618; cv=none; d=google.com; s=arc-20160816; b=EP1v4Sd/rlp9EI5YXpQvb5JKIdcZPwH/FukHF9/BR5w3Q4XBcksp8399jgfUJtsTNk FsGKuyfGEd42nYmdZW20+nXXXDH4er26XvQg/e29tWf0lT7c0eVZTVaPOjvj5iPV2ToA irzMIBoA1y96UKXLjeajtyyXB4a8VMaVNpBXeNLq6K4qA3baCBigDAP5CWGbF6RQZGL2 WEKyi0k3JycRg5uuT9Zt6jbJ7Oi9OYKFwnXyW5I9jSMKktyWHtC5s5UEZHhQV6k0OT6Z Xt96dT6H1/XbR2mYK9itbnRfC24EgEq4FjP9Y1vQeYt+A3TqR5kqAW1C82cIZYIsdfdU OI1g== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=ltMsD1DJnH2rqx7QPxxQVBC/u2tnwKyY5UmFgUin2iQ=; b=BY2vjrHqXFubDKQm1BiYgQUMeDU3jibH7/3gpajm3l6WwPjvQXIBtFneDkArP2FDfn mOibixzBp3HmPj/nsBovHhKekllLCxMFr4tXCjgmwT0EZ75A4sqA8HlMfIExA9TFLGEP RE4z+HrmneKbIyq1t8ktOR9mV4LaLSF69CxQVj9nEivwwTM7T9q5rAk9+cD5nI9EyFz+ alSSsitJK70BrFUbyt4E2hL+YySJp7miBDh94dyBXBgv+CCiiLiUWX7+bxbU07UHZjAE RAJiHPjVo8qw0sL7OKCTW4GuC04I2GM6cw6wo7fta5dBB6hl79sVZEen1h412ozz5G3E wI3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KaQfBJvG; 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 w8-v6si3202884plk.597.2018.01.22.01.16.43; Mon, 22 Jan 2018 01:16:58 -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=@linaro.org header.s=google header.b=KaQfBJvG; 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 S1752771AbeAVJQX (ORCPT + 99 others); Mon, 22 Jan 2018 04:16:23 -0500 Received: from mail-wr0-f195.google.com ([209.85.128.195]:44089 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751351AbeAVJQS (ORCPT ); Mon, 22 Jan 2018 04:16:18 -0500 Received: by mail-wr0-f195.google.com with SMTP id w50so7774152wrc.11 for ; Mon, 22 Jan 2018 01:16:17 -0800 (PST) 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:in-reply-to:user-agent; bh=ltMsD1DJnH2rqx7QPxxQVBC/u2tnwKyY5UmFgUin2iQ=; b=KaQfBJvGJCAVCnDGRMHOe0gUbGdCKUXYZagSlqY0EtTT53CKmYtDISzAlAmGIPEJam voABNAJu8YDF9k1M9pQZqr6kqAXN3ZmhmRKfEu8BoczZdLa8HGO2Bj06xH4k92YZNQEd CGWKQXJ+6Bfrr8QuzIoexMTmBQA5rgbsrCCY8= 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:in-reply-to:user-agent; bh=ltMsD1DJnH2rqx7QPxxQVBC/u2tnwKyY5UmFgUin2iQ=; b=R/fIHb8yZvHb+7yg3g64x0FtSXgZeet4WuET5oqWHs+y14ecwfa56tL1RY9kRkugDR Aiwnpx+cyzCq1mhrQOcT83XhjfzB/0JMzcEbSGJwKJRMzfMoBN0zhmyJk8FtLVAMpMei 2TNs1hzqppJoBrjgemNxwjsVRsu0iKD7iT4+sAlGP+SLUHI4+wJ+E+gWaM1nYKuI1jiB SuY2e0aBzSCTFHezW+PCXBHXik0UV3vKUxsMLhbbeYfYFAiEX5Y08lF4JEep+QydGHML uh+RFFP5DGAtqG1yloZyKSjvyD8JY0rHURjSv3BzvCmLkpWXD+XO2SpEfxt8gGxIYN9V lcRA== X-Gm-Message-State: AKwxyteC2+JosoGbQSQ5/dxJcSNZG+IA+4G9YLFmNOoNdRb7PS0B36Vm rbkXXaLGDq5auDQWTAUzKbTsyw== X-Received: by 10.223.136.24 with SMTP id d24mr6118335wrd.203.1516612577193; Mon, 22 Jan 2018 01:16:17 -0800 (PST) Received: from oak.lan (cpc141214-aztw34-2-0-cust773.18-1.cable.virginm.net. [86.9.19.6]) by smtp.gmail.com with ESMTPSA id m6sm6536364wmd.37.2018.01.22.01.16.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jan 2018 01:16:16 -0800 (PST) Date: Mon, 22 Jan 2018 09:16:13 +0000 From: Daniel Thompson To: Rob Herring Cc: 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@vger.kernel.org Subject: Re: [PATCH 2/4] dt-bindings: pwm-backlight: add a num-interpolation-steps property. Message-ID: <20180122091613.oyjjzwci3mmfc7j2@oak.lan> References: <20180110223046.17696-1-enric.balletbo@collabora.com> <20180110223046.17696-3-enric.balletbo@collabora.com> <20180119205249.fcbdyu6652ffsdmg@rob-hp-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180119205249.fcbdyu6652ffsdmg@rob-hp-laptop> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Daniel. > > + default-brightness-level = <6>; > > Aren't valid values 0, 16, 32, 48, etc.? > > Rob