From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Herring Subject: Re: [PATCH/RFC v10 03/19] DT: leds: Add led-sources property Date: Tue, 20 Jan 2015 11:29:16 -0600 Message-ID: References: <1420816989-1808-1-git-send-email-j.anaszewski@samsung.com> <1420816989-1808-4-git-send-email-j.anaszewski@samsung.com> <54B38682.5080605@samsung.com> <54B3F1EF.4060506@samsung.com> <54B4DA81.7060900@samsung.com> <54B8D4D0.3000904@samsung.com> <54B933D0.1090004@samsung.com> <54BE7DAB.80702@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from mail-qg0-f45.google.com ([209.85.192.45]:45019 "EHLO mail-qg0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751985AbbATR3h (ORCPT ); Tue, 20 Jan 2015 12:29:37 -0500 In-Reply-To: <54BE7DAB.80702@samsung.com> Sender: linux-leds-owner@vger.kernel.org List-Id: linux-leds@vger.kernel.org To: Jacek Anaszewski Cc: linux-leds@vger.kernel.org, "linux-media@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , Kyungmin Park , Bartlomiej Zolnierkiewicz , Pavel Machek , Bryan Wu , Richard Purdie , sakari.ailus@iki.fi, Sylwester Nawrocki , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Liam Girdwood , Mark Brown On Tue, Jan 20, 2015 at 10:09 AM, Jacek Anaszewski wrote: > On 01/16/2015 04:52 PM, Jacek Anaszewski wrote: >> >> On 01/16/2015 02:48 PM, Rob Herring wrote: [...] >>> You may want to add something like led-output-cnt or led-driver-cnt in >>> the parent so you know the max list size. >> >> >> Why should we need this? The number of current outputs exposed by the >> device is fixed and can be specified in a LED device bindings >> documentation. >> > > OK. The led-output-cnt property should be put in each sub-node, as the > number of the current outputs each LED can be connected to is variable. Sorry, I meant this for the parent node meaning how many outputs the driver IC has. I did say maybe because you may always know this. It can make it easier to allocate memory for led-sources knowing the max size up front. Rob > > New version: > > Optional properties for child nodes: > +led-sources-cnt : Number of device current outputs the LED is connected to. > +- led-sources : List of device current outputs the LED is connected to. The > + outputs are identified by the numbers that must be defined > + in the LED device binding documentation. > - label : The label for this LED. If omitted, the label is > taken from the node name (excluding the unit address). > > @@ -33,7 +47,9 @@ system-status { > > camera-flash { > label = "Flash"; > + led-sources-cnt = <2>; > + led-sources = <0>, <1>; > max-microamp = <50000>; > flash-max-microamp = <320000>; > flash-timeout-us = <500000>; > -} > +}; > > > -- > Best Regards, > Jacek Anaszewski