Message ID | 20141120131713.GC27527@amd |
---|---|
State | Needs Review / ACK, archived |
Headers | show |
Context | Check | Description |
---|---|---|
robh/checkpatch | warning | total: 1 errors, 2 warnings, 0 lines checked |
robh/patch-applied | success |
Hi Pavel, On 11/20/2014 02:17 PM, Pavel Machek wrote: > > Add attributes neccessary for LED flashes to > devicetree/bindings/leds/common.txt . > > This will allow me to add device tree support for adp1653 i2c flash > LED driver, and allow Jacek Anaszewski to add support for more LED > drivers.. > > Signed-off-by: Pavel Machek <pavel@ucw.cz> > > diff --git a/Documentation/devicetree/bindings/leds/common.txt b/Documentation/devicetree/bindings/leds/common.txt > index 2d88816..e9acbbc 100644 > --- a/Documentation/devicetree/bindings/leds/common.txt > +++ b/Documentation/devicetree/bindings/leds/common.txt > @@ -14,6 +14,15 @@ Optional properties for child nodes: > "ide-disk" - LED indicates disk activity > "timer" - LED flashes at a fixed, configurable rate > > +- max-microamp : maximum intensity in microamperes of the LED > + (torch LED for flash devices) > +- flash-max-microamp : maximum intensity in microamperes of the > + flash LED; it is mandatory if the LED should > + support the flash mode > +- flash-timeout-microsec : timeout in microseconds after which the flash > + LED is turned off > + > + > Examples: > > system-status { > @@ -21,3 +30,10 @@ system-status { > linux,default-trigger = "heartbeat"; > ... > }; > + > +camera-flash { > + label = "Flash"; > + max-microamp = <50000>; > + flash-max-microamp = <320000>; > + flash-timeout-microsec = <500000>; > +} > Why did you omit indicator-pattern? -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 11/20/2014 02:38 PM, Jacek Anaszewski wrote: > Hi Pavel, > > On 11/20/2014 02:17 PM, Pavel Machek wrote: >> >> Add attributes neccessary for LED flashes to >> devicetree/bindings/leds/common.txt . >> >> This will allow me to add device tree support for adp1653 i2c flash >> LED driver, and allow Jacek Anaszewski to add support for more LED >> drivers.. >> >> Signed-off-by: Pavel Machek <pavel@ucw.cz> >> >> diff --git a/Documentation/devicetree/bindings/leds/common.txt >> b/Documentation/devicetree/bindings/leds/common.txt >> index 2d88816..e9acbbc 100644 >> --- a/Documentation/devicetree/bindings/leds/common.txt >> +++ b/Documentation/devicetree/bindings/leds/common.txt >> @@ -14,6 +14,15 @@ Optional properties for child nodes: >> "ide-disk" - LED indicates disk activity >> "timer" - LED flashes at a fixed, configurable rate >> >> +- max-microamp : maximum intensity in microamperes of the LED >> + (torch LED for flash devices) >> +- flash-max-microamp : maximum intensity in microamperes of the >> + flash LED; it is mandatory if the LED should >> + support the flash mode >> +- flash-timeout-microsec : timeout in microseconds after which the flash >> + LED is turned off >> + >> + >> Examples: >> >> system-status { >> @@ -21,3 +30,10 @@ system-status { >> linux,default-trigger = "heartbeat"; >> ... >> }; >> + >> +camera-flash { >> + label = "Flash"; >> + max-microamp = <50000>; >> + flash-max-microamp = <320000>; >> + flash-timeout-microsec = <500000>; >> +} >> > > Why did you omit indicator-pattern? Actually, we've agreed with Sakari that we can handle indicator-pattern later. I would remove references to you, me and adp1653 driver from the commit message and mention that this modifications adjust the led common bindings to the LED Flash class that is to be added. Regards, Jacek -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Pavel, On Thu, Nov 20, 2014 at 02:17:13PM +0100, Pavel Machek wrote: > > Add attributes neccessary for LED flashes to > devicetree/bindings/leds/common.txt . > > This will allow me to add device tree support for adp1653 i2c flash > LED driver, and allow Jacek Anaszewski to add support for more LED > drivers.. > > Signed-off-by: Pavel Machek <pavel@ucw.cz> > > diff --git a/Documentation/devicetree/bindings/leds/common.txt b/Documentation/devicetree/bindings/leds/common.txt > index 2d88816..e9acbbc 100644 > --- a/Documentation/devicetree/bindings/leds/common.txt > +++ b/Documentation/devicetree/bindings/leds/common.txt > @@ -14,6 +14,15 @@ Optional properties for child nodes: > "ide-disk" - LED indicates disk activity > "timer" - LED flashes at a fixed, configurable rate > > +- max-microamp : maximum intensity in microamperes of the LED > + (torch LED for flash devices) > +- flash-max-microamp : maximum intensity in microamperes of the > + flash LED; it is mandatory if the LED should > + support the flash mode > +- flash-timeout-microsec : timeout in microseconds after which the flash > + LED is turned off It might be good to add a note that these may be arrays, depending on the device.
On Thu 2014-11-20 14:38:11, Jacek Anaszewski wrote: > Hi Pavel, > > On 11/20/2014 02:17 PM, Pavel Machek wrote: > > > >Add attributes neccessary for LED flashes to > >devicetree/bindings/leds/common.txt . > > > >This will allow me to add device tree support for adp1653 i2c flash > >LED driver, and allow Jacek Anaszewski to add support for more LED > >drivers.. > > > >Signed-off-by: Pavel Machek <pavel@ucw.cz> > > > >diff --git a/Documentation/devicetree/bindings/leds/common.txt b/Documentation/devicetree/bindings/leds/common.txt > >index 2d88816..e9acbbc 100644 > >--- a/Documentation/devicetree/bindings/leds/common.txt > >+++ b/Documentation/devicetree/bindings/leds/common.txt > >@@ -14,6 +14,15 @@ Optional properties for child nodes: > > "ide-disk" - LED indicates disk activity > > "timer" - LED flashes at a fixed, configurable rate > > > >+- max-microamp : maximum intensity in microamperes of the LED > >+ (torch LED for flash devices) > >+- flash-max-microamp : maximum intensity in microamperes of the > >+ flash LED; it is mandatory if the LED should > >+ support the flash mode > >+- flash-timeout-microsec : timeout in microseconds after which the flash > >+ LED is turned off > >+ > >+ > > Examples: > > > > system-status { > >@@ -21,3 +30,10 @@ system-status { > > linux,default-trigger = "heartbeat"; > > ... > > }; > >+ > >+camera-flash { > >+ label = "Flash"; > >+ max-microamp = <50000>; > >+ flash-max-microamp = <320000>; > >+ flash-timeout-microsec = <500000>; > >+} > > > > Why did you omit indicator-pattern? Well, I think its going to be device specific, and it was not specified well enough -- and I believe it needs more discussion. Indicator pattern would be basically some sequence of intensities in time, right? And your hardware has some preset number of patterns it can do...? There's a controller for 3-color LED in n900, and it takes programs for patterns. So I for example had a program that computed prime numbers and then blinked them on the LED, independently of the main CPU. So yes, patterns would be useful, but no, I don't know how to do them in generic way, and thus would prefer to avoid defining them in generic binding. Pavel
On Thu 2014-11-20 15:48:26, Jacek Anaszewski wrote: > On 11/20/2014 02:38 PM, Jacek Anaszewski wrote: > >Hi Pavel, > > > >On 11/20/2014 02:17 PM, Pavel Machek wrote: > >> > >>Add attributes neccessary for LED flashes to > >>devicetree/bindings/leds/common.txt . > >> > >>This will allow me to add device tree support for adp1653 i2c flash > >>LED driver, and allow Jacek Anaszewski to add support for more LED > >>drivers.. .. > > Actually, we've agreed with Sakari that we can handle > indicator-pattern later. Good. > I would remove references to you, me and adp1653 driver from the commit > message and mention that this modifications adjust the led common > bindings to the LED Flash class that is to be added. Ok, who can take this patch? Can you edit the changelog, or should I do it? Anything else that needs changing? Pavel
Hi! On Thu 2014-11-20 17:03:49, Sakari Ailus wrote: > On Thu, Nov 20, 2014 at 02:17:13PM +0100, Pavel Machek wrote: > > diff --git a/Documentation/devicetree/bindings/leds/common.txt b/Documentation/devicetree/bindings/leds/common.txt > > index 2d88816..e9acbbc 100644 > > --- a/Documentation/devicetree/bindings/leds/common.txt > > +++ b/Documentation/devicetree/bindings/leds/common.txt > > @@ -14,6 +14,15 @@ Optional properties for child nodes: > > "ide-disk" - LED indicates disk activity > > "timer" - LED flashes at a fixed, configurable rate > > > > +- max-microamp : maximum intensity in microamperes of the LED > > + (torch LED for flash devices) > > +- flash-max-microamp : maximum intensity in microamperes of the > > + flash LED; it is mandatory if the LED should > > + support the flash mode > > +- flash-timeout-microsec : timeout in microseconds after which the flash > > + LED is turned off > > It might be good to add a note that these may be arrays, depending on the > device. No, they really can't be arrays. AFAICT common.txt describes single LED, not array of them, and I don't think it is good idea to change that. Pavel
Hi Pavel, Sakari, On 11/20/2014 04:03 PM, Sakari Ailus wrote: > Hi Pavel, > > On Thu, Nov 20, 2014 at 02:17:13PM +0100, Pavel Machek wrote: >> >> Add attributes neccessary for LED flashes to >> devicetree/bindings/leds/common.txt . >> >> This will allow me to add device tree support for adp1653 i2c flash >> LED driver, and allow Jacek Anaszewski to add support for more LED >> drivers.. >> >> Signed-off-by: Pavel Machek <pavel@ucw.cz> >> >> diff --git a/Documentation/devicetree/bindings/leds/common.txt b/Documentation/devicetree/bindings/leds/common.txt >> index 2d88816..e9acbbc 100644 >> --- a/Documentation/devicetree/bindings/leds/common.txt >> +++ b/Documentation/devicetree/bindings/leds/common.txt >> @@ -14,6 +14,15 @@ Optional properties for child nodes: >> "ide-disk" - LED indicates disk activity >> "timer" - LED flashes at a fixed, configurable rate >> >> +- max-microamp : maximum intensity in microamperes of the LED >> + (torch LED for flash devices) >> +- flash-max-microamp : maximum intensity in microamperes of the >> + flash LED; it is mandatory if the LED should >> + support the flash mode >> +- flash-timeout-microsec : timeout in microseconds after which the flash >> + LED is turned off > > It might be good to add a note that these may be arrays, depending on the > device. > This binding is for a sub-node representing a single led. Do you know devices which would require an array of max currents for a sub-led? Regards, Jacek -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Pavel, On Thu, Nov 20, 2014 at 09:53:50PM +0100, Pavel Machek wrote: > Hi! > > On Thu 2014-11-20 17:03:49, Sakari Ailus wrote: > > On Thu, Nov 20, 2014 at 02:17:13PM +0100, Pavel Machek wrote: > > > > diff --git a/Documentation/devicetree/bindings/leds/common.txt b/Documentation/devicetree/bindings/leds/common.txt > > > index 2d88816..e9acbbc 100644 > > > --- a/Documentation/devicetree/bindings/leds/common.txt > > > +++ b/Documentation/devicetree/bindings/leds/common.txt > > > @@ -14,6 +14,15 @@ Optional properties for child nodes: > > > "ide-disk" - LED indicates disk activity > > > "timer" - LED flashes at a fixed, configurable rate > > > > > > +- max-microamp : maximum intensity in microamperes of the LED > > > + (torch LED for flash devices) > > > +- flash-max-microamp : maximum intensity in microamperes of the > > > + flash LED; it is mandatory if the LED should > > > + support the flash mode > > > +- flash-timeout-microsec : timeout in microseconds after which the flash > > > + LED is turned off > > > > It might be good to add a note that these may be arrays, depending on the > > device. > > No, they really can't be arrays. AFAICT common.txt describes single > LED, not array of them, and I don't think it is good idea to change > that. Right, if it describes a LED only, and not its controller, I guess it's fine. Some controllers can drive multiple flash LEDs at the same time and these need to be e.g. strobed together, and sometimes not; there are controllers that support both so it's up to the use case. That's probably more up to the driver though.
Hi Jacek, On Fri, Nov 21, 2014 at 08:38:33AM +0100, Jacek Anaszewski wrote: > >It might be good to add a note that these may be arrays, depending on the > >device. > > > > This binding is for a sub-node representing a single led. > Do you know devices which would require an array of max currents > for a sub-led? Individual LEDs can have different maximum current limits. So if you connect two LEDs, one may have a higher limit than the other.
Hi Pavel, On 11/20/2014 09:52 PM, Pavel Machek wrote: > On Thu 2014-11-20 15:48:26, Jacek Anaszewski wrote: >> On 11/20/2014 02:38 PM, Jacek Anaszewski wrote: >>> Hi Pavel, >>> >>> On 11/20/2014 02:17 PM, Pavel Machek wrote: >>>> >>>> Add attributes neccessary for LED flashes to >>>> devicetree/bindings/leds/common.txt . >>>> >>>> This will allow me to add device tree support for adp1653 i2c flash >>>> LED driver, and allow Jacek Anaszewski to add support for more LED >>>> drivers.. > .. >> >> Actually, we've agreed with Sakari that we can handle >> indicator-pattern later. > > Good. > >> I would remove references to you, me and adp1653 driver from the commit >> message and mention that this modifications adjust the led common >> bindings to the LED Flash class that is to be added. > > Ok, who can take this patch? Can you edit the changelog, or should I > do it? Anything else that needs changing? It's your patch :) For me the contents of the patch are ok. It requires device tree maintainer approval anyway. Regards, Jacek -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri 2014-11-21 09:15:31, Jacek Anaszewski wrote: > Hi Pavel, > > On 11/20/2014 09:52 PM, Pavel Machek wrote: > >On Thu 2014-11-20 15:48:26, Jacek Anaszewski wrote: > >>On 11/20/2014 02:38 PM, Jacek Anaszewski wrote: > >>>Hi Pavel, > >>> > >>>On 11/20/2014 02:17 PM, Pavel Machek wrote: > >>>> > >>>>Add attributes neccessary for LED flashes to > >>>>devicetree/bindings/leds/common.txt . > >>>> > >>>>This will allow me to add device tree support for adp1653 i2c flash > >>>>LED driver, and allow Jacek Anaszewski to add support for more LED > >>>>drivers.. > >.. > >> > >>Actually, we've agreed with Sakari that we can handle > >>indicator-pattern later. > > > >Good. > > > >>I would remove references to you, me and adp1653 driver from the commit > >>message and mention that this modifications adjust the led common > >>bindings to the LED Flash class that is to be added. > > > >Ok, who can take this patch? Can you edit the changelog, or should I > >do it? Anything else that needs changing? > > It's your patch :) For me the contents of the patch are ok. > It requires device tree maintainer approval anyway. Yeah, I was hoping relevant maintainers would speak up. I was not asking you to edit the changelog, sorry I was unclear. Bryan Wu, Richard Purdie: You are the maintainers. Can you take the patch? Pavel
On Mon, Nov 24, 2014 at 2:53 PM, Pavel Machek <pavel@ucw.cz> wrote: > On Fri 2014-11-21 09:15:31, Jacek Anaszewski wrote: >> Hi Pavel, >> >> On 11/20/2014 09:52 PM, Pavel Machek wrote: >> >On Thu 2014-11-20 15:48:26, Jacek Anaszewski wrote: >> >>On 11/20/2014 02:38 PM, Jacek Anaszewski wrote: >> >>>Hi Pavel, >> >>> >> >>>On 11/20/2014 02:17 PM, Pavel Machek wrote: >> >>>> >> >>>>Add attributes neccessary for LED flashes to >> >>>>devicetree/bindings/leds/common.txt . >> >>>> >> >>>>This will allow me to add device tree support for adp1653 i2c flash >> >>>>LED driver, and allow Jacek Anaszewski to add support for more LED >> >>>>drivers.. >> >.. >> >> >> >>Actually, we've agreed with Sakari that we can handle >> >>indicator-pattern later. >> > >> >Good. >> > >> >>I would remove references to you, me and adp1653 driver from the commit >> >>message and mention that this modifications adjust the led common >> >>bindings to the LED Flash class that is to be added. >> > >> >Ok, who can take this patch? Can you edit the changelog, or should I >> >do it? Anything else that needs changing? >> >> It's your patch :) For me the contents of the patch are ok. >> It requires device tree maintainer approval anyway. > > Yeah, I was hoping relevant maintainers would speak up. I was not > asking you to edit the changelog, sorry I was unclear. > > Bryan Wu, Richard Purdie: You are the maintainers. Can you take the > patch? I'm OK for this patch, but since Jacek and Sakari are working on pushing LED Flash class and driver into our LED subsystem. I need you guys' Ack for this. Then I can take it in my tree. Thanks, -Bryan -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Pavel, I would change the commit message to: DT: leds: Add flash led devices related properties Addition of a LED Flash class extension entails the need for flash led specific device tree properties. The properties being added are: max-microamp, flash-max-microamp, flash-timeout-microsec. After that you can add: Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com> Best Regards, Jacek Anaszewski On 11/20/2014 02:17 PM, Pavel Machek wrote: > > Add attributes neccessary for LED flashes to > devicetree/bindings/leds/common.txt . > > This will allow me to add device tree support for adp1653 i2c flash > LED driver, and allow Jacek Anaszewski to add support for more LED > drivers.. > > Signed-off-by: Pavel Machek <pavel@ucw.cz> > > diff --git a/Documentation/devicetree/bindings/leds/common.txt b/Documentation/devicetree/bindings/leds/common.txt > index 2d88816..e9acbbc 100644 > --- a/Documentation/devicetree/bindings/leds/common.txt > +++ b/Documentation/devicetree/bindings/leds/common.txt > @@ -14,6 +14,15 @@ Optional properties for child nodes: > "ide-disk" - LED indicates disk activity > "timer" - LED flashes at a fixed, configurable rate > > +- max-microamp : maximum intensity in microamperes of the LED > + (torch LED for flash devices) > +- flash-max-microamp : maximum intensity in microamperes of the > + flash LED; it is mandatory if the LED should > + support the flash mode > +- flash-timeout-microsec : timeout in microseconds after which the flash > + LED is turned off > + > + > Examples: > > system-status { > @@ -21,3 +30,10 @@ system-status { > linux,default-trigger = "heartbeat"; > ... > }; > + > +camera-flash { > + label = "Flash"; > + max-microamp = <50000>; > + flash-max-microamp = <320000>; > + flash-timeout-microsec = <500000>; > +} > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri 2014-11-21 09:39:06, Sakari Ailus wrote: > Hi Pavel, > > On Thu, Nov 20, 2014 at 09:53:50PM +0100, Pavel Machek wrote: > > Hi! > > > > On Thu 2014-11-20 17:03:49, Sakari Ailus wrote: > > > On Thu, Nov 20, 2014 at 02:17:13PM +0100, Pavel Machek wrote: > > > > > > diff --git a/Documentation/devicetree/bindings/leds/common.txt b/Documentation/devicetree/bindings/leds/common.txt > > > > index 2d88816..e9acbbc 100644 > > > > --- a/Documentation/devicetree/bindings/leds/common.txt > > > > +++ b/Documentation/devicetree/bindings/leds/common.txt > > > > @@ -14,6 +14,15 @@ Optional properties for child nodes: > > > > "ide-disk" - LED indicates disk activity > > > > "timer" - LED flashes at a fixed, configurable rate > > > > > > > > +- max-microamp : maximum intensity in microamperes of the LED > > > > + (torch LED for flash devices) > > > > +- flash-max-microamp : maximum intensity in microamperes of the > > > > + flash LED; it is mandatory if the LED should > > > > + support the flash mode > > > > +- flash-timeout-microsec : timeout in microseconds after which the flash > > > > + LED is turned off > > > > > > It might be good to add a note that these may be arrays, depending on the > > > device. > > > > No, they really can't be arrays. AFAICT common.txt describes single > > LED, not array of them, and I don't think it is good idea to change > > that. > > Right, if it describes a LED only, and not its controller, I guess it's > fine. Yes, this should describe one LED. Bryan Wu <cooloney@gmail.com> wanted me to get your ack. Can I have one? > Some controllers can drive multiple flash LEDs at the same time and these > need to be e.g. strobed together, and sometimes not; there are controllers > that support both so it's up to the use case. That's probably more up to the > driver though. Yes. Thanks, Pavel
On Tue 2014-11-25 22:09:49, Bryan Wu wrote: > On Mon, Nov 24, 2014 at 2:53 PM, Pavel Machek <pavel@ucw.cz> wrote: > > On Fri 2014-11-21 09:15:31, Jacek Anaszewski wrote: > >> Hi Pavel, > >> > >> On 11/20/2014 09:52 PM, Pavel Machek wrote: > >> >On Thu 2014-11-20 15:48:26, Jacek Anaszewski wrote: > >> >>On 11/20/2014 02:38 PM, Jacek Anaszewski wrote: > >> >>>Hi Pavel, > >> >>> > >> >>>On 11/20/2014 02:17 PM, Pavel Machek wrote: > >> >>>> > >> >>>>Add attributes neccessary for LED flashes to > >> >>>>devicetree/bindings/leds/common.txt . > >> >>>> > >> >>>>This will allow me to add device tree support for adp1653 i2c flash > >> >>>>LED driver, and allow Jacek Anaszewski to add support for more LED > >> >>>>drivers.. > >> >.. > >> >> > >> >>Actually, we've agreed with Sakari that we can handle > >> >>indicator-pattern later. > >> > > >> >Good. > >> > > >> >>I would remove references to you, me and adp1653 driver from the commit > >> >>message and mention that this modifications adjust the led common > >> >>bindings to the LED Flash class that is to be added. > >> > > >> >Ok, who can take this patch? Can you edit the changelog, or should I > >> >do it? Anything else that needs changing? > >> > >> It's your patch :) For me the contents of the patch are ok. > >> It requires device tree maintainer approval anyway. > > > > Yeah, I was hoping relevant maintainers would speak up. I was not > > asking you to edit the changelog, sorry I was unclear. > > > > Bryan Wu, Richard Purdie: You are the maintainers. Can you take the > > patch? > > I'm OK for this patch, but since Jacek and Sakari are working on > pushing LED Flash class and driver into our LED subsystem. I need you > guys' Ack for this. Then I can take it in my tree. Jacek acked it (provided I modify changelog). I can't get Sakari to get explicit ACK, but he was cc-ed on the discussion, and was ok with the idea. That should be enough...? Thanks, Pavel
Hi Jacek, On Fri, Nov 21, 2014 at 08:38:33AM +0100, Jacek Anaszewski wrote: > Hi Pavel, Sakari, > > On 11/20/2014 04:03 PM, Sakari Ailus wrote: > >Hi Pavel, > > > >On Thu, Nov 20, 2014 at 02:17:13PM +0100, Pavel Machek wrote: > >> > >>Add attributes neccessary for LED flashes to > >>devicetree/bindings/leds/common.txt . > >> > >>This will allow me to add device tree support for adp1653 i2c flash > >>LED driver, and allow Jacek Anaszewski to add support for more LED > >>drivers.. > >> > >>Signed-off-by: Pavel Machek <pavel@ucw.cz> > >> > >>diff --git a/Documentation/devicetree/bindings/leds/common.txt b/Documentation/devicetree/bindings/leds/common.txt > >>index 2d88816..e9acbbc 100644 > >>--- a/Documentation/devicetree/bindings/leds/common.txt > >>+++ b/Documentation/devicetree/bindings/leds/common.txt > >>@@ -14,6 +14,15 @@ Optional properties for child nodes: > >> "ide-disk" - LED indicates disk activity > >> "timer" - LED flashes at a fixed, configurable rate > >> > >>+- max-microamp : maximum intensity in microamperes of the LED > >>+ (torch LED for flash devices) > >>+- flash-max-microamp : maximum intensity in microamperes of the > >>+ flash LED; it is mandatory if the LED should > >>+ support the flash mode > >>+- flash-timeout-microsec : timeout in microseconds after which the flash > >>+ LED is turned off > > > >It might be good to add a note that these may be arrays, depending on the > >device. > > > > This binding is for a sub-node representing a single led. > Do you know devices which would require an array of max currents > for a sub-led? Oops, I missed to reply to this one. No, if this is just a single LED then I think it's fine.
Hi Pavel and Bryan, On Wed, Dec 03, 2014 at 04:51:55PM +0100, Pavel Machek wrote: > On Tue 2014-11-25 22:09:49, Bryan Wu wrote: > > On Mon, Nov 24, 2014 at 2:53 PM, Pavel Machek <pavel@ucw.cz> wrote: > > > On Fri 2014-11-21 09:15:31, Jacek Anaszewski wrote: > > >> Hi Pavel, > > >> > > >> On 11/20/2014 09:52 PM, Pavel Machek wrote: > > >> >On Thu 2014-11-20 15:48:26, Jacek Anaszewski wrote: > > >> >>On 11/20/2014 02:38 PM, Jacek Anaszewski wrote: > > >> >>>Hi Pavel, > > >> >>> > > >> >>>On 11/20/2014 02:17 PM, Pavel Machek wrote: > > >> >>>> > > >> >>>>Add attributes neccessary for LED flashes to > > >> >>>>devicetree/bindings/leds/common.txt . > > >> >>>> > > >> >>>>This will allow me to add device tree support for adp1653 i2c flash > > >> >>>>LED driver, and allow Jacek Anaszewski to add support for more LED > > >> >>>>drivers.. > > >> >.. > > >> >> > > >> >>Actually, we've agreed with Sakari that we can handle > > >> >>indicator-pattern later. > > >> > > > >> >Good. > > >> > > > >> >>I would remove references to you, me and adp1653 driver from the commit > > >> >>message and mention that this modifications adjust the led common > > >> >>bindings to the LED Flash class that is to be added. > > >> > > > >> >Ok, who can take this patch? Can you edit the changelog, or should I > > >> >do it? Anything else that needs changing? > > >> > > >> It's your patch :) For me the contents of the patch are ok. > > >> It requires device tree maintainer approval anyway. > > > > > > Yeah, I was hoping relevant maintainers would speak up. I was not > > > asking you to edit the changelog, sorry I was unclear. > > > > > > Bryan Wu, Richard Purdie: You are the maintainers. Can you take the > > > patch? > > > > I'm OK for this patch, but since Jacek and Sakari are working on > > pushing LED Flash class and driver into our LED subsystem. I need you > > guys' Ack for this. Then I can take it in my tree. > > Jacek acked it (provided I modify changelog). > > I can't get Sakari to get explicit ACK, but he was cc-ed on the > discussion, and was ok with the idea. That should be enough...? My apologies for missing this one --- I've gotten too much mail lately. :-P Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> The flash timeout is really a very coarse way to avoid overheating the flash (controller or LED) but it's still what is often used in practice. This doesn't prevent strobing the flash right after the previous strobe has stopped, but is definitely better than nothing; this at least prevents accidental overheating of the components.
On Tue 2014-11-25 22:09:49, Bryan Wu wrote: > On Mon, Nov 24, 2014 at 2:53 PM, Pavel Machek <pavel@ucw.cz> wrote: > > On Fri 2014-11-21 09:15:31, Jacek Anaszewski wrote: > >> Hi Pavel, > >> > >> On 11/20/2014 09:52 PM, Pavel Machek wrote: > >> >On Thu 2014-11-20 15:48:26, Jacek Anaszewski wrote: > >> >>On 11/20/2014 02:38 PM, Jacek Anaszewski wrote: > >> >>>Hi Pavel, > >> >>> > >> >>>On 11/20/2014 02:17 PM, Pavel Machek wrote: > >> >>>> > >> >>>>Add attributes neccessary for LED flashes to > >> >>>>devicetree/bindings/leds/common.txt . > >> >>>> > >> >>>>This will allow me to add device tree support for adp1653 i2c flash > >> >>>>LED driver, and allow Jacek Anaszewski to add support for more LED > >> >>>>drivers.. > >> >.. > >> >> > >> >>Actually, we've agreed with Sakari that we can handle > >> >>indicator-pattern later. > >> > > >> >Good. > >> > > >> >>I would remove references to you, me and adp1653 driver from the commit > >> >>message and mention that this modifications adjust the led common > >> >>bindings to the LED Flash class that is to be added. > >> > > >> >Ok, who can take this patch? Can you edit the changelog, or should I > >> >do it? Anything else that needs changing? > >> > >> It's your patch :) For me the contents of the patch are ok. > >> It requires device tree maintainer approval anyway. > > > > Yeah, I was hoping relevant maintainers would speak up. I was not > > asking you to edit the changelog, sorry I was unclear. > > > > Bryan Wu, Richard Purdie: You are the maintainers. Can you take the > > patch? > > I'm OK for this patch, but since Jacek and Sakari are working on > pushing LED Flash class and driver into our LED subsystem. I need you > guys' Ack for this. Then I can take it in my tree. Ok, patch with the 2 acks is now waiting in your inbox :-). Pavel
diff --git a/Documentation/devicetree/bindings/leds/common.txt b/Documentation/devicetree/bindings/leds/common.txt index 2d88816..e9acbbc 100644 --- a/Documentation/devicetree/bindings/leds/common.txt +++ b/Documentation/devicetree/bindings/leds/common.txt @@ -14,6 +14,15 @@ Optional properties for child nodes: "ide-disk" - LED indicates disk activity "timer" - LED flashes at a fixed, configurable rate +- max-microamp : maximum intensity in microamperes of the LED + (torch LED for flash devices) +- flash-max-microamp : maximum intensity in microamperes of the + flash LED; it is mandatory if the LED should + support the flash mode +- flash-timeout-microsec : timeout in microseconds after which the flash + LED is turned off + + Examples: system-status { @@ -21,3 +30,10 @@ system-status { linux,default-trigger = "heartbeat"; ... }; + +camera-flash { + label = "Flash"; + max-microamp = <50000>; + flash-max-microamp = <320000>; + flash-timeout-microsec = <500000>; +}
Add attributes neccessary for LED flashes to devicetree/bindings/leds/common.txt . This will allow me to add device tree support for adp1653 i2c flash LED driver, and allow Jacek Anaszewski to add support for more LED drivers.. Signed-off-by: Pavel Machek <pavel@ucw.cz>