Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3150111ybi; Tue, 2 Jul 2019 02:59:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqxY5Bo7gNHjQW68T9R02qr+n7sg3cVbR32s2NCzyw7secJPtM5nGX7s7jUL4/sl5IH1p0YX X-Received: by 2002:a63:8f55:: with SMTP id r21mr27198815pgn.318.1562061598659; Tue, 02 Jul 2019 02:59:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562061598; cv=none; d=google.com; s=arc-20160816; b=nSYC3IclVWnKZTDUAX6/i+hQHbLWelGnfulrMlPzZk44PQpxvaqSE9WtEYYwnI+SUI NUfeVTpAuHEZNrPUgPTha3LgS1pjU7+lGi0Xmqvc/KTOrOlSAyHkuXtLLVKPWgrnlAs0 Fl4TEWS6mCF3GcEiQj4//giCtfa68GIku/Y6L4+MK/v11fy+inO+razDFVy+u+sMHDZV YSs/s1CatNNPEz4pyuI5+5XeecqmKBip6q5XicC476zAD00o43j82+p6YM4D9J379btX d7019tnRPe+WULFJ7nOeNEOV6hpCcNTwU1mJWI6gzIYw64bKDTa1Edn/FZZT0Q5nj6gg MMQQ== 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=QRPK0qOkX5Q+M8nvo0n2KeWKFtd7tJOQgBeJJuKeUes=; b=QYt8TPxN041l657xrjTZ5m2IV/jGanXyy78QpDeeeVMZ6bKZv2YpcqsJ13isAdklMc FjtJHr505bxd23R2rXGMOo5jvMIzNvbkHpmtFni7xwNwPRQoDqEzn4Mxj8mgZrO48qlu Eo09/D6m8BgU6VkdAZj8Jxwc6AVbut+7ssostnaSD9B2sxp5L0mf4h0ez88CU6Vny/wl uCheIm/9CXN1j7YP1dDny8IBCf3uvZOTld+QPgyl8wTQ+bhqC7Kf1O3XueJsBw8pVzNb W5DIRioqLTJ4SGPI66mTBtm/XpFI5NaVlPwDn8Zbfuk5Fufy3kKG28wAKWHntEz04elB ZwQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EfsmAl9x; 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 v13si13666928pfe.217.2019.07.02.02.59.43; Tue, 02 Jul 2019 02:59: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; dkim=pass header.i=@linaro.org header.s=google header.b=EfsmAl9x; 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 S1727126AbfGBJ6x (ORCPT + 99 others); Tue, 2 Jul 2019 05:58:53 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:39968 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726526AbfGBJ6x (ORCPT ); Tue, 2 Jul 2019 05:58:53 -0400 Received: by mail-wm1-f65.google.com with SMTP id v19so259409wmj.5 for ; Tue, 02 Jul 2019 02:58:52 -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=QRPK0qOkX5Q+M8nvo0n2KeWKFtd7tJOQgBeJJuKeUes=; b=EfsmAl9xsk75PZQw1eUJrpmqGtNjtNVcKtdZ3k0Y5L5V8C0VwhUTn6oLj7Z/kwj7xA vebq/nBTJvTA3LEqmGJqGE4/JbzssjqYL5LEGjotpbgHycm6BAcppyawnkXy9PlrRg3L m1yg8jPukP5KaUGgNhlmW2IACKW10DFYGZDvLG2OAuBzYnmd0hc5m3Now6tquOQG5H3I Zc13t3OA3JOiOIDSGmQFaiGawELStthwhCUQZCpAS8Jx3RYX8uenqVmDEERYoVNDehFe VEg/hOOQzY0MtOtH+Wx+lVUIQFYeJA5Hrncc+tNoLHvy1COFp6pAoyse9mfU6KYMBU3i ZVeg== 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=QRPK0qOkX5Q+M8nvo0n2KeWKFtd7tJOQgBeJJuKeUes=; b=lwjLdYEDqC+0gcP8MPOFlyNUVKFDNOQ2pM4dyXM5KvMgm6qoss2b8aPQza9kV2M+U/ p2sMGSSO45caJCqeqGTJ3n+9qP3kcT6s2KkUEBgs4UqB+jzObq9DPeKQVzQmg4mj+xu5 HvNAGiZMu0jM4PxXE28EJm8/gvVoePy5Hsg0eSgnazFeJP8y0SnSUctxbt0L+woYF/uh BsBnFEQYIGaOk6yV4uuMmJxZCDT+3Naqavo55077ukpsOZNRACyzNb3pOnHgQk36nlbS GoiygLMz2mLdU01sBFtxr7+MH8b+xI+XNfjKF4VhCwR3E08g4zmrQbANpl7UR3xGvlvZ pr/Q== X-Gm-Message-State: APjAAAUK7wx+4xghtLWard2jAH91Y7fSSWC6ugW1UhBttcgTB0TZnmsm 1IIJWEL+/sYzo+W/uNZxVv8+Jg== X-Received: by 2002:a1c:6154:: with SMTP id v81mr2812406wmb.92.1562061531646; Tue, 02 Jul 2019 02:58:51 -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 y1sm1969442wma.32.2019.07.02.02.58.50 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 02 Jul 2019 02:58:51 -0700 (PDT) Date: Tue, 2 Jul 2019 10:58:49 +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, jingoohan1@gmail.com, dmurphy@ti.com, linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, tomi.valkeinen@ti.com, devicetree@vger.kernel.org Subject: Re: [PATCH 4/4] devicetree: Add led-backlight binding Message-ID: <20190702095849.fxlmiqcioihsi3zk@holly.lan> References: <20190701151423.30768-1-jjhiblot@ti.com> <20190701151423.30768-5-jjhiblot@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190701151423.30768-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 Mon, Jul 01, 2019 at 05:14:23PM +0200, Jean-Jacques Hiblot wrote: > From: Tomi Valkeinen > > Add DT binding for led-backlight. I think the patchset is in the wrong order; the DT bindings documentation should appear *before* the binding is implemented (amoung other things this prevent transient checkpatch warnings as the patchset is applied). > > Signed-off-by: Tomi Valkeinen > Signed-off-by: Jean-Jacques Hiblot > Cc: devicetree@vger.kernel.org > --- > .../video/backlight/led-backlight.txt | 39 +++++++++++++++++++ > 1 file changed, 39 insertions(+) > create mode 100644 Documentation/devicetree/bindings/video/backlight/led-backlight.txt > > diff --git a/Documentation/devicetree/bindings/video/backlight/led-backlight.txt b/Documentation/devicetree/bindings/video/backlight/led-backlight.txt > new file mode 100644 > index 000000000000..216cd52d624a > --- /dev/null > +++ b/Documentation/devicetree/bindings/video/backlight/led-backlight.txt > @@ -0,0 +1,39 @@ > +led-backlight bindings > + > +The node of the backlight driver IS the node of the LED. > + > +Required properties: > + - compatible: "led-backlight" > + - brightness-levels: Array of distinct LED brightness levels. These > + are in the range from 0 to 255, passed to the LED class driver. > + - default-brightness-level: the default brightness level (index into the > + array defined by the "brightness-levels" property) I think brightness-levels and default-brightness-level could be optional properties since a default 1:1 mapping seems reasonable given how constrained the LED brightness values are. Daniel. > + > +Optional properties: > + - power-supply: regulator for supply voltage > + - enable-gpios: contains a single GPIO specifier for the GPIO which enables > + and disables the backlight (see GPIO binding[0]) > + > +[0]: Documentation/devicetree/bindings/gpio/gpio.txt > + > +Example: > + > +led_ctrl { > + red_led@1 { > + label = "red"; > + reg = <1>; > + } > + > + backlight_led@2 { > + function = LED_FUNCTION_BACKLIGHT; > + reg = <2>; > + > + compatible = "led-backlight"; > + > + brightness-levels = <0 4 8 16 32 64 128 255>; > + default-brightness-level = <6>; > + > + power-supply = <&vdd_bl_reg>; > + enable-gpios = <&gpio 58 0>; > + }; > +}; > -- > 2.17.1 >