Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp905828ybd; Wed, 26 Jun 2019 07:56:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqwyILsV1CcjEx4n4K8t3rN90fBlV295DAyd6hjStQpPcq4cG38ywUaqkdVXA/f21aH0Hbai X-Received: by 2002:a65:664f:: with SMTP id z15mr3506023pgv.344.1561561018617; Wed, 26 Jun 2019 07:56:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561561018; cv=none; d=google.com; s=arc-20160816; b=RsvoEqwwNX1hgSNxDoBP5WG4oY6gi/352owixLmP2bHvfhV8jhueJ4CtpWzvtmk/FS JlXT0KLdsi4z4zUC2saoYwYXDIc58a4846traFGzStj01DkyAOQVAT3UwWFkwbH0HZ/R 2Rn/7ETt8lcbhXrRN0K6Oqpu0zOsPxSXD4PuMSG4824dP9BVGe70DThKRAuRWOy71j/y 7kQDlkG/B1zf1c/RG55iaLy+yC3qt1wmzAci35bqRYBEMuDT8/q55GudkEBU/M4VaVBh LqcZlwMYL7Ru9zbRUUI7Zw8PebPQ4+5re2AVS30xmAwX+LngiMVUNdHP2XckkKB9FLEX 7J+A== 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; bh=0xL7ZVsbzq6vA9v5I1qcjsXkBlaWbSN9Wlo7KD+1aB0=; b=cnDHowSpPjvm4ywHe2a4XCEGmwcB9fCUR5vW9owlwS791PXxwVvM7mGJZ+KFcRMVVh 4yK3r62QYu0w8Cvi2wTUXvEEBGCf8SVNOdYDhUd64W2tEnnW+gOLTybe7YaimkmEh4kt Ln8bWqcEX0aSfEdJUx/CqBjVJ5J7cnojfLajF0mzu/Hl/qJfhQYzapR8ITJs4l+/kMLK AHfEyx0nhGVSyFo9kbGRzSEgu+ltSgEiYaYooqF0rXUrswgizbPEhx2J48vXGX99N3fm cmxAXlceNTuRT39xR3IPrkYYjiH0fPFjasQGjeA5eN9teAoREHvAYIbXZ1/YChLDtI5n WwDQ== 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 t24si16888819pgv.242.2019.06.26.07.56.42; Wed, 26 Jun 2019 07:56:58 -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; 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 S1728229AbfFZO41 (ORCPT + 99 others); Wed, 26 Jun 2019 10:56:27 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:42492 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726029AbfFZO40 (ORCPT ); Wed, 26 Jun 2019 10:56:26 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id ABF5F807C0; Wed, 26 Jun 2019 16:56:13 +0200 (CEST) Date: Wed, 26 Jun 2019 16:56:18 +0200 From: Pavel Machek To: Matthias Kaehlcke Cc: Thierry Reding , Lee Jones , 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 , Jacek Anaszewski Subject: Re: [PATCH v2 4/4] backlight: pwm_bl: Set scale type for brightness curves specified in the DT Message-ID: <20190626145617.GB22348@xo-6d-61-c0.localdomain> References: <20190624203114.93277-1-mka@chromium.org> <20190624203114.93277-5-mka@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190624203114.93277-5-mka@chromium.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 2019-06-24 13:31:13, 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. I don't think this works. Some hardware does takes brightness in perceptual units, converting it in the LED controller. Pavel