Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5585119ybe; Tue, 10 Sep 2019 06:06:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzFCASSu5AoOOhYPJuB/G6qD5/FKIx9JxpEqf0xBLEdjTR/SH92TRCJ37F++1c/BOa9BRTv X-Received: by 2002:a50:fd03:: with SMTP id i3mr28502416eds.223.1568120789928; Tue, 10 Sep 2019 06:06:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568120789; cv=none; d=google.com; s=arc-20160816; b=ZLTobRGh/kb6tw/8nNYJ/jY5QbFZJZtMSWGh/BhPavhnYCg+FAN890dmiEvCs2ZaEt 1/pveQZBe2I6eeby9CdvRn86QZlH8+HOaM0Uw4RDh3WgThheqHyIe2FuIvgiy/Mp9DpM BmOrOsSx2DUb5LdirlIsy7THWgVvWNcJAXJ05bUoWeojJFVXyLcrsIUuFOVhgaS//pdh MyThVv24C8GvBRMPQ6fukn8nVQ6dgfDFwwQZgL1khuPWb8QB05HnQp0/HnvtZXDYZIcX o2AAIdFYF9bSxHInt4s9hZ9c1z1HwX4bkKkf2B+A/Sdme5B8qzaf+YAKabShVzryir8a PPsw== 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; bh=2U0vF9K5FUZesrb/f2dR+z0p/SVAlF7QvnXLB1ik3bo=; b=yCzATSHJ4am6ptUGHD1ekUqb/7QEtsnisW4WHqyZXZCWkdo6tPb/LZwkbCVUXBYTwy 3scRWmgZ03kLWCZE5ECK6nOhdtqcGNwYjdTQKdKebc23AWHrhBVKeoax+ZGrjMplJSbo uik40FHhuJUwxKM7DUQsqoq7kh/XA9Qtraw9pj4h0xg9bYmWSAAvWa8A2nq2UBPBfnXc 6YZ0QnOrTfOGM6xkZhl9BzoqKx7UKu/73CiUX0iSxN1/LQ85WuGNfAwb5AIpwcfj7pFT XwirnK4lz9V6z1w5u2L2HqJEDCr33LSs8x0X+G0kFedncA2xiWrrhxtzgVp7/zQxX1EO ULTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="SRBVq+k/"; 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 b8si9754734ejv.106.2019.09.10.06.06.03; Tue, 10 Sep 2019 06:06:29 -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="SRBVq+k/"; 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 S1728289AbfIJL01 (ORCPT + 99 others); Tue, 10 Sep 2019 07:26:27 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:46409 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726119AbfIJL01 (ORCPT ); Tue, 10 Sep 2019 07:26:27 -0400 Received: by mail-wr1-f66.google.com with SMTP id d17so6670101wrq.13 for ; Tue, 10 Sep 2019 04:26:26 -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:in-reply-to:user-agent; bh=2U0vF9K5FUZesrb/f2dR+z0p/SVAlF7QvnXLB1ik3bo=; b=SRBVq+k/9dc8SXn1wOvnBCc62YimdTFEAa7BaW0MnrQ46cgN9H+PU81Tp9sHi+xsDJ 1VSTFchloZhE48V5IFUIAurGh/6Hoe5uU1tpS8BYGUdnGZUOjcJzlb0IS/shw18Og+Cb t/dsc5/OJzyVYaoRVjx49msQUe2jgVctiuKDTkRxpshWJrEdhC62UEMB9aWVc4adn0Ce e49duMogzQrkfuF6b7Jrfm1mQx1qmlv49al+0aIW7ii4MEhz9RljbDMwtr71WfPrZDHI 9DiOaPjXpQQMw2I2yd1YNj5GJM/M5hvw8zscYctV5caP6llagJrzf/RgH1+JXEfwIbjg cqDw== 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=2U0vF9K5FUZesrb/f2dR+z0p/SVAlF7QvnXLB1ik3bo=; b=o9xc79lm1PQRaS85UlVHblBHoAr8pOrwYiASU6NjuNC5yNxMcrXR7KjuAlY9k5Zb9D BPGl/3V5Adj0h0FaW7V5aMutVcjBw7qQ2tV+hTmalUpH+iJRUJV0LXBMfzeOeak2lrPc VxHRObxc2cQZcqmBShIGQijaPI6qdfgAj7+/fATHz3tN4GBRG+GkuvheGQyFUWVgtZgp aMTLm81ZEps+t138D5NvbXSjR5Ub74TBT3G8lNCrcf45CHksXrEOG76MkClwumFJ8ftQ MR6MKaBk8way3eLQNsK73Lr1jq8zDDeQM07GsXhBiZrB6Ks+9BwxpEaIkpiK93LawH4k Pxvw== X-Gm-Message-State: APjAAAWD8oOHNlaRKwBzLM2FO/+C2i09shv6eu7ea59nj2UiY1trVfAS NrZLvaZGzwspg4FAWmrklKR/0A== X-Received: by 2002:a5d:5689:: with SMTP id f9mr23802140wrv.224.1568114785307; Tue, 10 Sep 2019 04:26:25 -0700 (PDT) Received: from holly.lan (cpc141214-aztw34-2-0-cust773.18-1.cable.virginm.net. [86.9.19.6]) by smtp.gmail.com with ESMTPSA id y13sm36988391wrg.8.2019.09.10.04.26.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2019 04:26:24 -0700 (PDT) Date: Tue, 10 Sep 2019 12:26:22 +0100 From: Daniel Thompson To: Jean-Jacques Hiblot Cc: jacek.anaszewski@gmail.com, pavel@ucw.cz, robh+dt@kernel.org, mark.rutland@arm.com, lee.jones@linaro.org, dmurphy@ti.com, linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, dridevel@lists.freedesktop.org, tomi.valkeinen@ti.com Subject: Re: [PATCH v5 4/4] backlight: add led-backlight driver Message-ID: <20190910112622.iflmknh5qplbfoyu@holly.lan> References: <20190910105946.23057-1-jjhiblot@ti.com> <20190910105946.23057-5-jjhiblot@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190910105946.23057-5-jjhiblot@ti.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 10, 2019 at 12:59:46PM +0200, Jean-Jacques Hiblot wrote: > From: Tomi Valkeinen > > This patch adds a led-backlight driver (led_bl), which is similar to > pwm_bl except the driver uses a LED class driver to adjust the > brightness in the HW. Multiple LEDs can be used for a single backlight. > > Signed-off-by: Tomi Valkeinen > Signed-off-by: Jean-Jacques Hiblot > Acked-by: Pavel Machek > --- > drivers/video/backlight/Kconfig | 7 + > drivers/video/backlight/Makefile | 1 + > drivers/video/backlight/led_bl.c | 264 +++++++++++++++++++++++++++++++ > 3 files changed, 272 insertions(+) > create mode 100644 drivers/video/backlight/led_bl.c > > diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig > index 8b081d61773e..585a1787618c 100644 > --- a/drivers/video/backlight/Kconfig > +++ b/drivers/video/backlight/Kconfig > @@ -458,6 +458,13 @@ config BACKLIGHT_RAVE_SP > help > Support for backlight control on RAVE SP device. > > +config BACKLIGHT_LED > + tristate "Generic LED based Backlight Driver" > + depends on LEDS_CLASS && OF > + help > + If you have a LCD backlight adjustable by LED class driver, say Y > + to enable this driver. > + > endif # BACKLIGHT_CLASS_DEVICE > > endmenu > diff --git a/drivers/video/backlight/Makefile b/drivers/video/backlight/Makefile > index 63c507c07437..2a67642966a5 100644 > --- a/drivers/video/backlight/Makefile > +++ b/drivers/video/backlight/Makefile > @@ -57,3 +57,4 @@ obj-$(CONFIG_BACKLIGHT_TPS65217) += tps65217_bl.o > obj-$(CONFIG_BACKLIGHT_WM831X) += wm831x_bl.o > obj-$(CONFIG_BACKLIGHT_ARCXCNN) += arcxcnn_bl.o > obj-$(CONFIG_BACKLIGHT_RAVE_SP) += rave-sp-backlight.o > +obj-$(CONFIG_BACKLIGHT_LED) += led_bl.o > diff --git a/drivers/video/backlight/led_bl.c b/drivers/video/backlight/led_bl.c > new file mode 100644 > index 000000000000..a72456e11fb9 > --- /dev/null > +++ b/drivers/video/backlight/led_bl.c > @@ -0,0 +1,264 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * Copyright (C) 2015-2019 Texas Instruments Incorporated - http://www.ti.com/ > + * Author: Tomi Valkeinen > + * > + * Based on pwm_bl.c > + */ > + > +#include > +#include Maybe this is a nitpick but it is one I have now raised three times and I don't recall any response, what symbols from this header are used in this file? AFAICT everything defined in this header includes the string "gpio" and that string doesn't appear anywhere in the file (except this line). > +#include > +#include > +#include > +#include Come to think of it, are you sure you need this include? devm_kzalloc() doesn't comes from this file. > +#define BKL_FULL_BRIGHTNESS 255 This is unused. Please remove. Other than that, looks good! Daniel.