Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1839202ybd; Thu, 27 Jun 2019 02:27:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqw6MxIXb+R2n6132pP3CObvq9Fqr6d3wlPF/nV48QU8VwoudtSvaAJM1R3HgJMI+Aaq1hf2 X-Received: by 2002:a17:902:70c3:: with SMTP id l3mr3497126plt.248.1561627652040; Thu, 27 Jun 2019 02:27:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561627652; cv=none; d=google.com; s=arc-20160816; b=RItFHuJWKZwwuxamc247qFI/9UjKI37cmXx0gBeeFyPGYFY0Xw3oHwRCgH/sTKhMWt 1AqkGnCkZ8NdAtkSiyf1yS/C/Mo6cVVSpuxIbS/s+82qOlVGtb6EY2BX94ydyqLPteTZ zNhPeQsjLx3t72BVc12c5Bl+5NmodYlEygsdQukQ1puZM4hrWKpcRqME1qnr71HY0+xZ /v57LHB06IzzUYs+mBDqmZ0SdjsI3/7scMAgnOfQXEMdH4ukMtu4D7l+15KeJx+HlV89 IkbqeK4PLbxE3iR+hAXu3S2iDeAXeKqMxwgZrhWxHSUFHo0sC26K9Z8M+uj60Q3B1GC8 EkCQ== 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=LDEo8sY3vpdehIJiLNOJb41+3SEg4OJB1McKdbsbLIA=; b=ZPBpoVo+FlHwjtGbetoH6LNSZei+a93r3J12WveHjTaAiWsy8I3/mrbMDMu6qvsGlk KShB7YVUtKjctyUXva1IGCPz6Nhfmer3Fz5uMdZ9icO0ZR41IeKyUC2r7k7JoZfBzaT8 7/hTJeYh1pWw3Zex7gD1e8KTy1eNR+nYdPx1lcRosCs4V8d83pQtQKlNpCQJc30qhspo Dd46pf5MZKguwRK8j+ZZDT/b8LRPZC33FmtziRLbrerjZDVfHsPwvu8tR5VY2z2hON4J QQjP/dOhoUPzeCRWkL+1JBx2v1u0rXvotJocVcIN4vDCrWE2AUGGE2iaRc/03XB7rx69 vhVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rxjj862C; 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 q2si1670775pgh.177.2019.06.27.02.27.15; Thu, 27 Jun 2019 02:27:32 -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=rxjj862C; 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 S1726669AbfF0JY7 (ORCPT + 99 others); Thu, 27 Jun 2019 05:24:59 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:39549 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726658AbfF0JY6 (ORCPT ); Thu, 27 Jun 2019 05:24:58 -0400 Received: by mail-wr1-f66.google.com with SMTP id x4so1681260wrt.6 for ; Thu, 27 Jun 2019 02:24:56 -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=LDEo8sY3vpdehIJiLNOJb41+3SEg4OJB1McKdbsbLIA=; b=rxjj862CxQk8EcoCFKXxBXec7q2dUTnfV23dSWU3s6L44wRwVyzKQI9LaItmJJBCYr CCunUbf0DyHes+96gfl0uMFK7u1ofaigi6tzk8foroRtjW67UkxmOjGR6pS8kxcMHMQf gfDC+UhYjbyEUkiMyFnCXp19uDzY8x/EIFJkHM36kWk82KVh6kEh17ORV4Ap0dqDjQeP eodW+lpOR5ylkyFRmF441elJYxUkOm61ILlY1XXEY0Qjg+u0/dV1FxmGel1jFTcSljsA mWoLPSgxDbcZ1/DraVDtzbuYhHkXnZ+w/hbhz5oruBYDlQJrnauT9rMlNjkp6tmEGn5i i8sg== 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=LDEo8sY3vpdehIJiLNOJb41+3SEg4OJB1McKdbsbLIA=; b=Kj4I4nxtu93LGjwbmy9r8JBLZlWlV4S5bQ5PtXIvHLsW488UeoimbrvcUCcY+P8ogY 1rB/B9Apcf2Sn3ubxk84jjVLlZi+xG44pgLO2d7P8y18oT7zOmiLWlhBbRiRtLO0062F grcFKer/sSQ6UaPHR6XOhe5UAld7x11v59B4jowLdZ1k3HX7gcIr6ipJU3b3j/8APfQC TnlXuH56U8d6pRIkXEHKYcRetTmzTfti89QmgGtZMICK5di/y+bTcsTWPDFk1SFkcCep KpHeKvddat7cSbdsCw2yflO1E886XHl6t9h8qkEO/YAD/Qk11ovEww4h1GoBFzsTOpaR Is8A== X-Gm-Message-State: APjAAAUc0tm79pa2QJblvyqcooA88XyfWA5wDg+hTgCM5kuCPdH3G+b7 ZgYNs/M89GEZ+wi1dqFIUAxJYg== X-Received: by 2002:adf:cc85:: with SMTP id p5mr2224711wrj.47.1561627496119; Thu, 27 Jun 2019 02:24:56 -0700 (PDT) Received: from dell ([2.27.35.164]) by smtp.gmail.com with ESMTPSA id h84sm5790048wmf.43.2019.06.27.02.24.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Jun 2019 02:24:55 -0700 (PDT) Date: Thu, 27 Jun 2019 10:24:53 +0100 From: Lee Jones To: Daniel Thompson Cc: Matthias Kaehlcke , Thierry Reding , 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 3/4] backlight: pwm_bl: Set scale type for CIE 1931 curves Message-ID: <20190627092453.GB2000@dell> References: <20190613194326.180889-1-mka@chromium.org> <20190613194326.180889-4-mka@chromium.org> <61ed137c-31bb-c695-4174-0484fe667d6c@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <61ed137c-31bb-c695-4174-0484fe667d6c@linaro.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 Fri, 21 Jun 2019, Daniel Thompson wrote: > On 13/06/2019 20:43, Matthias Kaehlcke wrote: > > For backlight curves calculated with the CIE 1931 algorithm set > > the brightness scale type property accordingly. This makes the > > scale type available to userspace via the 'scale' sysfs attribute. > > > > Signed-off-by: Matthias Kaehlcke > > I'd like to keep discussion on patch 2 open a bit longer (it's not part of > the thread below patch 2 but Pavel had concerns about the sysfs interface) > so this ack won't really push things forward but FWIW: > > Acked-by: Daniel Thompson Does this depend on patch 2, or is it orthogonal? > > --- > > drivers/video/backlight/pwm_bl.c | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c > > index fb45f866b923..f067fe7aa35d 100644 > > --- a/drivers/video/backlight/pwm_bl.c > > +++ b/drivers/video/backlight/pwm_bl.c > > @@ -553,6 +553,8 @@ static int pwm_backlight_probe(struct platform_device *pdev) > > goto err_alloc; > > } > > + memset(&props, 0, sizeof(struct backlight_properties)); > > + > > if (data->levels) { > > /* > > * For the DT case, only when brightness levels is defined > > @@ -591,6 +593,8 @@ static int pwm_backlight_probe(struct platform_device *pdev) > > pb->levels = data->levels; > > } > > + > > + props.scale = BACKLIGHT_SCALE_CIE1931; > > } else { > > /* > > * That only happens for the non-DT case, where platform data > > @@ -601,7 +605,6 @@ static int pwm_backlight_probe(struct platform_device *pdev) > > pb->lth_brightness = data->lth_brightness * (state.period / pb->scale); > > - memset(&props, 0, sizeof(struct backlight_properties)); > > props.type = BACKLIGHT_RAW; > > props.max_brightness = data->max_brightness; > > bl = backlight_device_register(dev_name(&pdev->dev), &pdev->dev, pb, > > > -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog