Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754397AbbK0LTV (ORCPT ); Fri, 27 Nov 2015 06:19:21 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:42164 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752475AbbK0LTS (ORCPT ); Fri, 27 Nov 2015 06:19:18 -0500 X-AuditID: cbfec7f4-f79026d00000418a-b7-56583c345a83 Message-id: <56583C32.5030307@samsung.com> Date: Fri, 27 Nov 2015 12:19:14 +0100 From: Jacek Anaszewski User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130804 Thunderbird/17.0.8 MIME-version: 1.0 To: Milo Kim Cc: robh+dt@kernel.org, lee.jones@linaro.org, broonie@kernel.org, devicetree@vger.kernel.org, linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 3/9] Documentation: dt-bindings: leds: add LM3633 LED binding information References: <1448521025-2796-1-git-send-email-milo.kim@ti.com> <1448521025-2796-4-git-send-email-milo.kim@ti.com> In-reply-to: <1448521025-2796-4-git-send-email-milo.kim@ti.com> Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOLMWRmVeSWpSXmKPExsVy+t/xa7omNhFhBq1zWC2mPnzCZjH/yDlW i/tfjzJaXN41h81i65t1jBbLf61jsWjde4Tdgd1j06pONo871/aweRy/sZ3J4/MmuQCWKC6b lNSczLLUIn27BK6MW9s6mAp2S1d0dS9mamB8KtrFyMEhIWAi8XKtaxcjJ5ApJnHh3nq2LkYu DiGBpYwSU7ofM0I4zxglJu2aygZSxSugJbHnaBcLiM0ioCoxrXMbmM0mYCjx88VrJhBbVCBC 4s/pfawQ9YISPybfA6sREZCTWDZrD9gGZoFZjBJvW4+DDRUWSJJY/3cOWJGQQLFEw9p/YM2c AvYS6yYtYAexmQWsJVZO2sYIYctLbF7zlnkCI9AUhB2zkJTNQlK2gJF5FaNoamlyQXFSeq6h XnFibnFpXrpecn7uJkZIcH/Zwbj4mNUhRgEORiUeXon08DAh1sSy4srcQ4wSHMxKIryMWhFh QrwpiZVVqUX58UWlOanFhxilOViUxHnn7nofIiSQnliSmp2aWpBaBJNl4uCUamBsPJ38ruZq 77uSmz88pPxXdu7Q2Wl2ZOHjSAvV6ZpulpK5jw7f3ZBz7sO9wN+qy8+yHZPhmX73t+SE9tMO Cgf0cpqCgx6WzZ5nrX/D/WT2xLMrbvErzfbR5kt9ZNvN61SUXf4i79LqwsgcLbuC0CX7FCN0 nqh4vfQ8csn7Sl8M+4vHBQpHf0kqsRRnJBpqMRcVJwIAyDUn22oCAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3647 Lines: 118 Hi Milo, On 11/26/2015 07:56 AM, Milo Kim wrote: > LM3633 LED device is one of TI LMU device list. > > Cc: Rob Herring > Cc: devicetree@vger.kernel.org > Cc: Lee Jones > Cc: Jacek Anaszewski > Cc: Mark Brown > Cc: linux-leds@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Milo Kim > --- > .../devicetree/bindings/leds/leds-lm3633.txt | 24 ++++++++++++++++++++++ > 1 file changed, 24 insertions(+) > create mode 100644 Documentation/devicetree/bindings/leds/leds-lm3633.txt > > diff --git a/Documentation/devicetree/bindings/leds/leds-lm3633.txt b/Documentation/devicetree/bindings/leds/leds-lm3633.txt > new file mode 100644 > index 0000000..a553894 > --- /dev/null > +++ b/Documentation/devicetree/bindings/leds/leds-lm3633.txt > @@ -0,0 +1,24 @@ > +TI LMU LM3633 LED device tree bindings > + > +Required properties: > + - compatible: "ti,lm3633-leds" > + > +Child nodes: > + Each node matches with LED control bank. > + Please refer to the datasheet [1]. leds/common.txt documentation says that child nodes represent discrete LED elements. > + Required properties of a child node: > + - led-sources: List of enabled channels from 0 to 5. > + Please refer to LED binding [2]. led-sources property should contain always one element - a control bank identifier that the iout is to be associated with. For example, if there are three LEDs and they should be controlled with control bank A, then the bindings should look as follows (assuming that control bank identifiers start from 0 [A:0, B:1, C:2, etc. - it has to be also explicitly stated in the documentation]: lvled1 { led-sources = <2>; led-max-microamp = <1000>; } lvled2 { led-sources = <2>; led-max-microamp = <29000>; } lvled3 { led-sources = <2>; led-max-microamp = <7000>; } The driver should expose singled LED class device for this arrangement. Since all of these LEDs will be controlled by the common bank, the lowest led-max-micromp constraint value from the three should be taken as a base for calculating max_brightness property of the LED class device. Of course in the sane case all these properties should have the same values. If the LEDs are to be connected to separate banks, then DT child nodes should look e.g. as follows (led-max-microamp values are set arbitrarily here): lvled4 { led-sources = <6>; led-max-microamp = <20000>; } lvled5 { led-sources = <7>; led-max-microamp = <17000>; } lvled6 { led-sources = <8>; led-max-microamp = <11000>; } You can of course add label properties to the child nodes. LED class device name could be composed out of LED names separated with colon, so here it would be: lvled4:levled5:lvled6 > + Optional properties of a child node: > + - label: LED channel identification. Please refer to LED binding [2]. > + - led-max-microamp: Max current setting. Type is . > + Unit is microampere. Range is from 5000 to 30000. > + Step is 1000. Please refer to LED binding [2]. > + > +Example: Please refer to ti-lmu dt-bindings [3]. > + > +[1] http://www.ti.com/product/LM3633/datasheet > +[2] ../leds/common.txt > +[2] ../mfd/ti-lmu.txt Last index should be [3] and all references above should be corrected accordingly. -- Best Regards, Jacek Anaszewski -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/