From mboxrd@z Thu Jan 1 00:00:00 1970 From: pavel@ucw.cz (Pavel Machek) Date: Tue, 18 Nov 2014 17:51:48 +0100 Subject: [RFC] adp1653: Add device tree bindings for LED controller In-Reply-To: <546B6D86.8090701@samsung.com> References: <20141116075928.GA9763@amd> <20141117145857.GO8907@valkosipuli.retiisi.org.uk> <546AFEA5.9020000@samsung.com> <20141118084603.GC4059@amd> <546B19C8.2090008@samsung.com> <20141118113256.GA10022@amd> <546B40FA.2070409@samsung.com> <20141118132159.GA21089@amd> <546B6D86.8090701@samsung.com> Message-ID: <20141118165148.GA11711@amd> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi! > >If the hardware LED changes with one that needs different current, the > >block for the adp1653 stays the same, but white LED block should be > >updated with different value. > > I think that you are talking about sub nodes. Indeed I am leaning > towards this type of design. I think I am :-). > >>I agree that flash-timeout should be per led - an array, similarly > >>as in case of iout's. > > > >Agreed about per-led, disagreed about the array. As all the fields > >would need arrays, and as LED system currently does not use arrays for > >label and linux,default-trigger, I believe we should follow existing > >design and model it as three devices. (It _is_ physically three devices.) > > Right, I missed that the leds/common.txt describes child node. > > I propose following modifications to the binding: > > Optional properties for child nodes: > - iout-mode-led : maximum intensity in microamperes of the LED > (torch LED for flash devices) > - iout-mode-flash : initial intensity in microamperes of the > flash LED; it is required to enable support > for the flash led > - iout-mode-indicator : initial intensity in microamperes of the > indicator LED; it is required to enable support > for the indicator led > - max-iout-mode-led : maximum intensity in microamperes of the LED > (torch LED for flash devices) > - max-iout-mode-flash : maximum intensity in microamperes of the > flash LED > - max-iout-mode-indicator : maximum intensity in microamperes of the > indicator LED > - flash-timeout : timeout in microseconds after which flash > led is turned off Ok, I took a look, and "iout" is notation I understand, but people may have trouble with and I don't see it used anywhere else. Also... do we need both "current" and "max-current" properties? But regulators already have "regulator-max-microamp" property. So what about: max-microamp : maximum intensity in microamperes of the LED (torch LED for flash devices) max-flash-microamp : initial intensity in microamperes of the flash LED; it is required to enable support for the flash led flash-timeout-microseconds : timeout in microseconds after which flash led is turned off If you had indicator on the same led, I guess indicator-microamp : recommended intensity in microamperes of the LED for indication ...would do? > I propose to avoid name "torch", as for ordinary leds it would > be misleading. Agreed. Thanks, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html