Received: by 10.223.176.46 with SMTP id f43csp4999wra; Fri, 19 Jan 2018 12:54:19 -0800 (PST) X-Google-Smtp-Source: ACJfBouyeaVhOlbEQ6lyWRpH536TFQVqXbeAopqJCUc5nKwy32TaptZbQkNkAgKyBKnz+DLHKQQF X-Received: by 10.99.105.72 with SMTP id e69mr34908991pgc.239.1516395259630; Fri, 19 Jan 2018 12:54:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516395259; cv=none; d=google.com; s=arc-20160816; b=QiQAqaPEvJbCLYreAjBVAwZJeOMuV8WMe+TpkwcXdKtQwCm/3+W12CPBy7UU/zPK1N M97WRQLvvUaiwuNQenyP0BDY2+Lwhgr8GMeHqwKvGt4sz1cSLqC1BeZiFJFCPRcFgyyT CtsMiql3eN8yuVAamCzIcg3gav+DbTrfD3F+OyK3omhy8yUtZ6VaJp2gjFgBStYJmx1p dli/EnGVBr5FWTEDu97F7lepPx0jgwZp7UUrkJPr4zBQ1ijCm7nJco+EzNm3C2JKJ4AB ae2WyDUXJLm75jcRICT5vI+NMZV/CSzROEOsuX8ghx/6JZ1ag+ViWk6MxtnOlU/qM6Ia WTXQ== 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:arc-authentication-results; bh=zLSiCMDzuHBR1viPKP7f+0il/pvBJiZEYHpZWhVTVjc=; b=sQXtO2OoiB8bDVcQY0rEZQeIENiVYfGJfdDYxMM+upfKM9GuYxu0IgseZYmJfnI54F pTwO1skP2DTeKr9VOSPs6iuC8L3Dejkuv+WEQkczrBVqy+rXQT8S3SLKjMrh5Y8XNzcG vbav9YWfK14C08NlgiD22bOzEcbahJKak/IP4FUOctqgdonMG2nOnt5SPX6JLZqvL5n0 KQg2aUO2JD0YlyosEPQ3wLc9j1BgALy4BylILcFqYlCa2Az1Lx03D1VEuJsy77Sf0uHJ PSxQ0OkqnoyR9wqjs2JRkTUguoaaSzn0QdIsUio52+9tT0cBqC5BWXA8GEFTMlmU0RXs i0Jw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z13si8550594pgp.347.2018.01.19.12.54.05; Fri, 19 Jan 2018 12:54:19 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756376AbeASUw7 (ORCPT + 99 others); Fri, 19 Jan 2018 15:52:59 -0500 Received: from mail-oi0-f65.google.com ([209.85.218.65]:34564 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752220AbeASUwv (ORCPT ); Fri, 19 Jan 2018 15:52:51 -0500 Received: by mail-oi0-f65.google.com with SMTP id a70so2015595oib.1; Fri, 19 Jan 2018 12:52:51 -0800 (PST) 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=zLSiCMDzuHBR1viPKP7f+0il/pvBJiZEYHpZWhVTVjc=; b=VKyvm6m5Fofus9jT8How56i5JGkAF2tYfOGAT/jd/ahJxn2sN3T+k8BEr8V8UYNzWT aeXrahMVLUiuIvKKTDNVxFNQ/FF6Q/6YzhiTms7jrulj2TxcTaHRnmygsSxGq/655F1x WUAwT4mN6KjxN+HrqLJA7+VTqxBudgvVLjoh0tEOnkxxsdurnjL8hCaHf3Bf2LlTgGoh HSq0KYjhr68vzEN1Be+QElG6zz8DLEI/75nxRB55kNmMuNTvlBbiZpu0zp9lj5H8dIP7 Owyulrjw6OgRNcPoEURJFsvQuysYyiP3Sxulqpb16b7KD2zKlDlMw2B4UQAvRpD0djB3 HlwQ== X-Gm-Message-State: AKwxytdY3uTj12kNRycX0LsTh3Z4LPWofVDywLsoG+3E5sUQpg3Xv+KK 46bOShR9DP77YIKv5G4GSg== X-Received: by 10.202.171.195 with SMTP id u186mr5857592oie.253.1516395170594; Fri, 19 Jan 2018 12:52:50 -0800 (PST) Received: from localhost (216-188-254-6.dyn.grandenetworks.net. [216.188.254.6]) by smtp.gmail.com with ESMTPSA id j67sm4773376otc.39.2018.01.19.12.52.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 19 Jan 2018 12:52:50 -0800 (PST) Date: Fri, 19 Jan 2018 14:52:49 -0600 From: Rob Herring To: Enric Balletbo i Serra Cc: Daniel Thompson , 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: <20180119205249.fcbdyu6652ffsdmg@rob-hp-laptop> References: <20180110223046.17696-1-enric.balletbo@collabora.com> <20180110223046.17696-3-enric.balletbo@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180110223046.17696-3-enric.balletbo@collabora.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > + default-brightness-level = <6>; Aren't valid values 0, 16, 32, 48, etc.? Rob