Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp364162ybe; Mon, 2 Sep 2019 02:54:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqx0MiqZuHLnDkfaV99tvHKHMxFsLPwZhuf9TPPzyQurxJFewwsoa7LdU5E5vV3BSOEpUwFt X-Received: by 2002:aa7:8bcc:: with SMTP id s12mr18146919pfd.93.1567418079098; Mon, 02 Sep 2019 02:54:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567418079; cv=none; d=google.com; s=arc-20160816; b=e+emXP1pe0WkHbd1RTJ0mtpBtR55cHlhq3LPCh34AqeyOCKmaCSuJAptt5YeLH6BYJ ErsSKKOpsCcuGiZigE3kDjqN1v8WSsSIGKtbgkW5EJrmpHH7zVdvZq8P7/dD0FDek3h4 6MUKcszNDMF1pYxziM6V/xsI6WhixFU6hDWLExjwt7Rj+WaYjoBlKez1aqFC4rJ+Oc7c KaWbiIQo5W1gWeb0QQI441sqpE04x8jcfC4h7uaqsm/D6lEk9Nc/VZS1crEUj5ZQgxrI mLkAePozwEBoif5hfIEBFne+4rQNuIGKeYR2pFSmvvht8tY7RKKb/0PYZX3mJQle/t/a ccBA== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=iK4LKa2PqlS0Y5u4Gjl7mrzOSTmztak1fj4wGqVsFy4=; b=ygg0QqSqhV1bEcoJvus2JG6gcSUGHbBbDEvofjSCxAL92slwE+Ga5MNNteosCQouOh GaCtISfdpt3rfrzPNv5lX3nKnKcrvgDflK27LUIaPSZ0Nt/Vg0aAYvFcBHIDmBpVc7K9 SmH92fBrhX4h2g2r++2JMCvDreHcQusKSR3dVPoCB2lSQMnxbERNpTaR4v+6jExSOMMh ANMMYBykPLywfixskN4sZU+j/b71I3ezA+x0XiEA/ESsbuzoe0Smypdqunhp8xdbXhdz ZLlJ+dEj+H1hXJpntTtftVE7amT5fGN+7OJPNsELw0nzf4EmT0Mhb4y4YbL3Ea/V8VEc gNJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="S/WMwjjB"; 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 x16si3556384pff.124.2019.09.02.02.54.24; Mon, 02 Sep 2019 02:54:39 -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; dkim=pass header.i=@linaro.org header.s=google header.b="S/WMwjjB"; 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 S1731330AbfIBJmQ (ORCPT + 99 others); Mon, 2 Sep 2019 05:42:16 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:51302 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730685AbfIBJmP (ORCPT ); Mon, 2 Sep 2019 05:42:15 -0400 Received: by mail-wm1-f68.google.com with SMTP id k1so13797231wmi.1 for ; Mon, 02 Sep 2019 02:42:13 -0700 (PDT) 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:content-transfer-encoding:in-reply-to :user-agent; bh=iK4LKa2PqlS0Y5u4Gjl7mrzOSTmztak1fj4wGqVsFy4=; b=S/WMwjjBsYD6eC5+gEOI58+jRpAry6yXwLdfqno73t/WpmJzLCQpqM2O2mTs/aiwQR TCGv+n2vwxgVgIx+fPgz4pHjr9PA1fIL+38d3IdqZWTS9Tyg0SCxGxy5hC9PnOHU0A6S 6S6nOWcPZFNCZ2aIevsy5XbQrn1qE0XwXbaXnXNnt6jhsNbdKuXnJjHv+pVAVFGLna0+ YU/tKj9qpFXh/951Jev2PUuDzIubEmF24MUyCESqrgAuuraAsPwd1+e18ZC6zmc4eaRi cQ7yC7GHWkx6zeRgTvQrH97fL7TXhIoW0isOYDcSdW/bYVSopm5JEQjiBCDxmVrFQc+/ YUuA== 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:content-transfer-encoding :in-reply-to:user-agent; bh=iK4LKa2PqlS0Y5u4Gjl7mrzOSTmztak1fj4wGqVsFy4=; b=dwKeXWYmS7FDFLKED6ZRLhQViZ6MZK3NbypADlFfzZhKaeqzjWjos3X8KU70u2fyON GpMmF2WBatTTS/UcK2t1mOY3lnBWsIuNRGjDCVckFY9g8nZ3A9fWAdFIQ5iDJF0l1RkD AXGFwTwc9SADNUHkmqFTmJxI1iFIwGf9+VTYmheqJUr45TF9YbW6U8H8YBlLENUUliPn +tCwwOgda1XNjReGFG0IekyOjHGStSyDtyyBR1ByQpbPdTtU/GiuNN9eGpH6v4/uuOq5 sjfvTvfC9i29Fah+pnlmO8ksvKznqyB7DNBqTpi8DOP3MHZ/AtvW3r7TaTPC5ou3OMC8 s4lA== X-Gm-Message-State: APjAAAXM9/s+rPLiO1KG0usJg0xcDaEqp1/ij4uy2a/ULyumYemHPi+f Vftu23vXixiYnV3IH/O2Bz5sSA== X-Received: by 2002:a7b:c019:: with SMTP id c25mr35998457wmb.116.1567417333221; Mon, 02 Sep 2019 02:42:13 -0700 (PDT) Received: from dell ([95.147.198.93]) by smtp.gmail.com with ESMTPSA id k9sm16402618wrq.15.2019.09.02.02.42.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 02 Sep 2019 02:42:12 -0700 (PDT) Date: Mon, 2 Sep 2019 10:42:11 +0100 From: Lee Jones To: Matthias Kaehlcke Cc: Thierry Reding , Daniel Thompson , Jingoo Han , Bartlomiej Zolnierkiewicz , linux-pwm@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Enric Balletbo i Serra , Douglas Anderson , Brian Norris , Pavel Machek , Jacek Anaszewski Subject: Re: [PATCH v3 4/4] backlight: pwm_bl: Set scale type for brightness curves specified in the DT Message-ID: <20190902094211.GO32232@dell> References: <20190709190007.91260-1-mka@chromium.org> <20190709190007.91260-5-mka@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190709190007.91260-5-mka@chromium.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 09 Jul 2019, Matthias Kaehlcke wrote: > Check if a brightness curve specified in the device tree is linear or > not and set the corresponding property accordingly. This makes the > scale type available to userspace via the 'scale' sysfs attribute. > > To determine if a curve is linear it is compared to a interpolated linear > curve between min and max brightness. The curve is considered linear if > no value deviates more than +/-5% of ${brightness_range} from their > interpolated value. > > Signed-off-by: Matthias Kaehlcke > Acked-by: Daniel Thompson > --- > Changes in v3: > - none > > Changes in v2: > - use 128 (power of two) instead of 100 as factor for the slope > - add comment about max quantization error > - added Daniel's 'Acked-by' tag > --- > drivers/video/backlight/pwm_bl.c | 30 ++++++++++++++++++++++++++++++ > 1 file changed, 30 insertions(+) Applied, thanks. -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog