Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp645941ybi; Fri, 21 Jun 2019 05:56:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqxuHK1uoRgWcrDx8GFjeYFyYptHQ+DXmyWq3n8NIU+oi+VXN2sklTMXmUX9LGghiaHRu4fS X-Received: by 2002:a63:1b26:: with SMTP id b38mr18698332pgb.257.1561121782910; Fri, 21 Jun 2019 05:56:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561121782; cv=none; d=google.com; s=arc-20160816; b=iga9tn63wrxJe/Z/2UNoii2pLo4tgU8j52n/259Z1jYKQRmKS+EeYBz2RQAAAVgtoe /jh3z0fvzBY5WzWh5qYN/NWSCuwFpby0SL5f0mj5l85YR8hnQm7gKrbMZ51reE0/k/lG hM6T07SpKvyYvhloEArJy7YzcEs+5OsNK6ytd3DcKy/3uAT4D2cwdjYdIil1Ysxhzg+8 gxNasfwY5L9sBVxOnCaKfDNTn+KquDju3r4VUuW7skI1jYngTQ065EWjtH3kI3LVnZbn H4r5A+90nVgyylvYFV4ALT387XudCn3ywwd3GfuG2ZSpjEXj6RO3OUacb2RUBLUdoFi9 PxNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=M5roWua+sE0QDauEpfxqdxQ5SjcRxbCv1Yw8mVidcLA=; b=vaJQwbS0iFKjVpe3quviMKXbNNJ1iB8LIaujVPgF69FNRntcZxnQvakcobp23K31RE kajzBpdQqtCWd+oSIF85OzTVScD3GXiygy/UFKTof++i9UbwdhT5sMkDXt1jdwmbhGod jLgjaxNj/J7x2n/oQCTWfA1Flfw8RfIgDsUNYhtVTzbJLdhS4BKwcqIjzL62qP76pTUQ 4YCqxRp+8Stp7+ya1pp18zDL4Eor+Hbt000zHgOhMKeF97g9zrge3DoIna/VlQUzuota IUxLx9uJ6Wlg2AWPVLNXsygtDhwEHXIgB9nCSQ2MLkT9jxjICt4YacboocT+Kyf1a7CP A7FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aywzB083; 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 n190si2523123pgn.362.2019.06.21.05.56.07; Fri, 21 Jun 2019 05:56:22 -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=aywzB083; 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 S1726285AbfFUMzy (ORCPT + 99 others); Fri, 21 Jun 2019 08:55:54 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:56162 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726299AbfFUMzx (ORCPT ); Fri, 21 Jun 2019 08:55:53 -0400 Received: by mail-wm1-f65.google.com with SMTP id a15so6230353wmj.5 for ; Fri, 21 Jun 2019 05:55:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=M5roWua+sE0QDauEpfxqdxQ5SjcRxbCv1Yw8mVidcLA=; b=aywzB083QiInYx90tUDlA2Hh05BuCQgZDjn3VehTjpIgCX6kvyryZZZgNltfKT70sB F3qwGoFmp+QHwoMASFBpXOXmDA1u8gDTK8lhy4rcKYOkH7C3zw31pA4Ry0alSD12QyUw sWCXF3q9POBLF4MF+qFQ7/lvznPucP59jYYrGzeHgpdAlrGWmBxYIA6VyiIu5uYy19OG cqp9xLMBxKSPdhdf1Rs3tLUMePHQS2EbUa5SEHdfEbu/x8gfulc3C2LuFmzcw/qoZx2A Cs10u5TDbwS8zfZG6G2laGy/B7THSa1636OwpHdLnAel6mH+6kdo1gA6nnE3ZMK0ftSS KTHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=M5roWua+sE0QDauEpfxqdxQ5SjcRxbCv1Yw8mVidcLA=; b=L2bXWDXIsw9aSr3yhVbKJDgvy03NJoALJB9olY7M84MtxuvRgtmbUwwvQQCfxEUoK1 D7BgAjurEYxEDs2grR6YRb2Uiwi8ruijE5uYyAabkwB9WzamGWcO3+Wy598cPok5ueZs 0E+m3odCXMmGrY4j63E2DGA5DUYyT8MsC11Ku6ztNJPKaRJsqzsTa2grt8MeYlm63vM2 3rTv4Tf4hv0HiSLe33A0FxAWWseQnYuYIYgfIx5kTHZAl3k4MYJ3ejUJa5BAuLEl9aMB 598F6u3+dGNcPPjHj1iiDq5qP8/aaUDTKOJ+j0WfXOo2X0BT6uG8KQXHWFUO/ZAMe5iK UZ4Q== X-Gm-Message-State: APjAAAUfvoS+IDciZYPpjo1pORzHxEGYnUAIoaEC3BmX5bP8dPxoJLAo C1sw7IXwbFjf3D/RAAyX0BppPw== X-Received: by 2002:a1c:b6d4:: with SMTP id g203mr4059348wmf.19.1561121751770; Fri, 21 Jun 2019 05:55:51 -0700 (PDT) Received: from holly.lan (cpc141214-aztw34-2-0-cust773.18-1.cable.virginm.net. [86.9.19.6]) by smtp.googlemail.com with ESMTPSA id l12sm1761640wmj.22.2019.06.21.05.55.50 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Fri, 21 Jun 2019 05:55:51 -0700 (PDT) Subject: Re: [PATCH 3/4] backlight: pwm_bl: Set scale type for CIE 1931 curves To: Matthias Kaehlcke , Thierry Reding , Lee Jones , Jingoo Han , Bartlomiej Zolnierkiewicz Cc: 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 References: <20190613194326.180889-1-mka@chromium.org> <20190613194326.180889-4-mka@chromium.org> From: Daniel Thompson Message-ID: <61ed137c-31bb-c695-4174-0484fe667d6c@linaro.org> Date: Fri, 21 Jun 2019 13:55:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190613194326.180889-4-mka@chromium.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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, >