Received: by 10.223.176.5 with SMTP id f5csp831487wra; Wed, 7 Feb 2018 08:12:41 -0800 (PST) X-Google-Smtp-Source: AH8x227MxqYQLFQH8aB/N65pqmOwY3DexBVlIC4eBka0HqusYv7SaJcrc5USImGomt5scG7YeH5t X-Received: by 10.101.86.73 with SMTP id m9mr5378537pgs.70.1518019961429; Wed, 07 Feb 2018 08:12:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518019961; cv=none; d=google.com; s=arc-20160816; b=hNatRpuuHtpL46VxjjNdJhf/BOReabQdFSVxX2tcJRWDA4taKyeCccIkx8j062QI+x SmNUeeZGDCsq7+hXIU/nde54DS7P8MGS2BbSovkt4bjeWu/NCkKHU/LrqYMN078sOXWf YVdCrFOcAFCQrEVtdiTJr8hQWcAE9uvOrxvhPdtHtOAlpMn3X0XSksqsBub6YLlDWbls ko7Dgjdcr67xifKyrnC0jDtZ4f9F4Qgu9kooeYVJ3qVBqTXBhsea0dEYiYOUgK6vo7DX G/TLuReINjOBLjrib0QM5VnzIQiRegIsal3bh5PIz/JVH19knwm5Xxrakb29gKTDbyaX +gZQ== 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=v37dIWMwmteP8QqWaJ68NmgJ/ewVp79fQt2AA57nDuo=; b=FRgKZTpBSLn/SaAewjROUxvjbVBzK1w3guN21Vc33UGDWeA8tIO9YUb0FSPmCEGnVN iVN6j6VKAe4Ybts1j+Hhk7zHAZPUndQW6KeBUIr2G+rVQOUdBrJ+pRB5V8+DVOyOW6vi t9PNfyVECWpW8UlIIOZq0lYSkVs4ziPHIJ14NqO3J9p7GrOukNdDte2PAJ9kMH5lOuwi fXG7v1AdzqGcbFgF4Iis3dkHD3JW9hUEsft1HlJSbdUdDp8iTJO6v71pRnupZR3lw5fW VsPFDmXnuEIbIcE1r40gG9y0n+fkLmZbB0j2R4C2dqdFKPwLzJgLEqJiPpqg/Y7bdW/1 Tuig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fODfBLJ0; 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 y12-v6si1256129plt.1.2018.02.07.08.12.27; Wed, 07 Feb 2018 08:12:41 -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=fODfBLJ0; 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 S1754588AbeBGQLq (ORCPT + 99 others); Wed, 7 Feb 2018 11:11:46 -0500 Received: from mail-wr0-f195.google.com ([209.85.128.195]:40306 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754381AbeBGQLo (ORCPT ); Wed, 7 Feb 2018 11:11:44 -0500 Received: by mail-wr0-f195.google.com with SMTP id i56so1624925wra.7 for ; Wed, 07 Feb 2018 08:11:43 -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=v37dIWMwmteP8QqWaJ68NmgJ/ewVp79fQt2AA57nDuo=; b=fODfBLJ0nKwX8y2S8x8k4i1iz4Nzpj/4e00a92hWdNGQ4L7O5KQAFouH9DpSzznbwK i+q02WVEiCmTCnrlUSo04ZtNKOZtVHLdPJgmox8umsBgtPHdqqHjXA5iJNn9FV6tk1fX F+r6AbZnx+gL9lCKlp/2Vbp7qJEb3QvoMVz5w= 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=v37dIWMwmteP8QqWaJ68NmgJ/ewVp79fQt2AA57nDuo=; b=WdN551LePgOUUFo3izgq5hcPX8a57cIzUf27YFTu2175pXQojzFSyq8PhQ3T1ROx0r Q0rjxc7Gb6/XFuo9JhpoELA/XBag15Lg2Qcgla5MC2TbhEYDjjFYLrVEwUzxF8UY2+0c 7cTARzIMwOe8t0YTFJ27BS8tQsuOMenMpyfEtBc4j/QdeUftkRl08auH95KPBj7RiOdK xONDUVdObNvgy+v3zKCe2IbAVe8/91cvdTByZZSb0UgQN/x9stJWJ6MP8LES0fztkPFK T5AwhQ67kzjPLLKxxRvPA6exatAaCdxOYiX6rAIopGdyBq7zOlYsvbKiaHja5KEttWjH s7Wg== X-Gm-Message-State: APf1xPAsh5//X2dvPyZsYbjXQbpLVERm0M3Gj7BenpggQu70f407Fu8+ vQO3Zvxp3qW4GCDGkudsvi7kOA== X-Received: by 10.223.158.132 with SMTP id a4mr6004470wrf.236.1518019903169; Wed, 07 Feb 2018 08:11:43 -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 b133sm1686147wmh.4.2018.02.07.08.11.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Feb 2018 08:11:42 -0800 (PST) Date: Wed, 7 Feb 2018 16:11:40 +0000 From: Daniel Thompson To: Enric Balletbo i Serra Cc: Doug Anderson , Pavel Machek , Rob Herring , 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 v2 2/4] dt-bindings: pwm-backlight: add a num-interpolation-steps property. Message-ID: <20180207161140.irxnsv6dwwmuwczu@oak.lan> References: <20180207141337.22247-1-enric.balletbo@collabora.com> <20180207141337.22247-3-enric.balletbo@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180207141337.22247-3-enric.balletbo@collabora.com> 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 Wed, Feb 07, 2018 at 03:13:35PM +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 Acked-by: Daniel Thompson > --- > Changes since v1: > - Add an example with a small but realistic curve. Suggested by Rob and > Daniel > > .../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.15.1 >