Skip to contentSkip to conversation

Add attributes neccessary for LED flashes to devicetree/bindings/leds/common.txt

PATCH In review Pavel Machek 5 participants 24 messages Nov 20, 2014 – Dec 22, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add attributes neccessary for LED flashes to devicetree/bindings/leds/common.txt

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..

Documentation/devicetree/bindings/leds/common.txt +16 -0
index 2d88816..e9acbbc 100644
@@ -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>;
+}
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#1 lore raw

Hi Pavel,

Quoted 32 lines · Pavel Machek

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..

Documentation/devicetree/bindings/leds/common.txt +9 -0
index 2d88816..e9acbbc 100644
@@ -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 {

Documentation/devicetree/bindings/leds/common.txt system-status { · line 39

Quoted 10 lines
Documentation/devicetree/bindings/leds/common.txt +7 -0
@@ -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?

#2 lore raw
Quoted 33 lines · Jacek Anaszewski

Hi Pavel,

Quoted 30 lines · Pavel Machek

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..

Documentation/devicetree/bindings/leds/common.txt +9 -0
index 2d88816..e9acbbc 100644
@@ -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:
 
Quoted 15 lines

Documentation/devicetree/bindings/leds/common.txt system-status { · line 39

Quoted 13 lines
Documentation/devicetree/bindings/leds/common.txt +7 -0
  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

#3 lore raw
Quoted 11 lines · Jacek Anaszewski
Quoted 10 lines · Jacek Anaszewski

Hi Pavel,

Quoted 7 lines · Pavel Machek

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..

..

Quoted 3 lines

Actually, we've agreed with Sakari that we can handle indicator-pattern later.

Good.

Quoted 3 lines

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

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#4 lore raw

Hi Pavel,

Quoted 17 lines · Pavel Machek
Quoted 11 lines · Jacek Anaszewski
Quoted 10 lines · Jacek Anaszewski

Hi Pavel,

Quoted 7 lines · Pavel Machek

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..

..

Quoted 3 lines

Actually, we've agreed with Sakari that we can handle indicator-pattern later.

Quoted 8 lines

Good.

Quoted 3 lines

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

#5 lore raw
Quoted 26 lines · Jacek Anaszewski

Hi Pavel,

Quoted 23 lines · Pavel Machek
Quoted 11 lines · Jacek Anaszewski
Quoted 10 lines · Jacek Anaszewski

Hi Pavel,

Quoted 7 lines · Pavel Machek

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..

..

Quoted 3 lines

Actually, we've agreed with Sakari that we can handle indicator-pattern later.

Good.

Quoted 3 lines

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.

Quoted 5 lines
Quoted 2 lines

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

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#6 lore raw
Quoted 30 lines · Pavel Machek
Quoted 29 lines · Jacek Anaszewski

Hi Pavel,

Quoted 25 lines · Pavel Machek
Quoted 11 lines · Jacek Anaszewski
Quoted 10 lines · Jacek Anaszewski

Hi Pavel,

Quoted 7 lines · Pavel Machek

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..

..

Quoted 3 lines

Actually, we've agreed with Sakari that we can handle indicator-pattern later.

Good.

Quoted 3 lines

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?

Quoted 8 lines
Quoted 2 lines

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

#7 lore raw
Quoted 37 lines · Bryan Wu
Quoted 36 lines · Pavel Machek
Quoted 26 lines · Jacek Anaszewski

Hi Pavel,

Quoted 23 lines · Pavel Machek
Quoted 11 lines · Jacek Anaszewski
Quoted 10 lines · Jacek Anaszewski

Hi Pavel,

Quoted 7 lines · Pavel Machek

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..

..

Quoted 3 lines

Actually, we've agreed with Sakari that we can handle indicator-pattern later.

Good.

Quoted 3 lines

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.

Quoted 5 lines
Quoted 2 lines

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.

Quoted 6 lines
Quoted 2 lines

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

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Acked-by
#8 lore raw

Hi Pavel and Bryan,

Quoted 41 lines · Pavel Machek
Quoted 40 lines · Bryan Wu
Quoted 38 lines · Pavel Machek
Quoted 26 lines · Jacek Anaszewski

Hi Pavel,

Quoted 23 lines · Pavel Machek
Quoted 11 lines · Jacek Anaszewski
Quoted 10 lines · Jacek Anaszewski

Hi Pavel,

Quoted 7 lines · Pavel Machek

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..

..

Quoted 3 lines

Actually, we've agreed with Sakari that we can handle indicator-pattern later.

Good.

Quoted 3 lines

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.

Quoted 5 lines
Quoted 2 lines

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?

Quoted 8 lines
Quoted 3 lines

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

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.

Signature · 4 lines
Kind regards,

Sakari Ailus
e-mail: [email protected]	XMPP: [email protected]
#9 lore raw
In reply to Bryan Wu
Quoted 37 lines · Bryan Wu
Quoted 36 lines · Pavel Machek
Quoted 26 lines · Jacek Anaszewski

Hi Pavel,

Quoted 23 lines · Pavel Machek
Quoted 11 lines · Jacek Anaszewski
Quoted 10 lines · Jacek Anaszewski

Hi Pavel,

Quoted 7 lines · Pavel Machek

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..

..

Quoted 3 lines

Actually, we've agreed with Sakari that we can handle indicator-pattern later.

Good.

Quoted 3 lines

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.

Quoted 5 lines
Quoted 2 lines

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.

Quoted 6 lines
Quoted 2 lines

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

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#10 lore raw
In reply to Jacek Anaszewski
Quoted 32 lines · Jacek Anaszewski

Hi Pavel,

Quoted 29 lines · Pavel Machek

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..

Documentation/devicetree/bindings/leds/common.txt +9 -0
index 2d88816..e9acbbc 100644
@@ -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:
 
Quoted 15 lines

Documentation/devicetree/bindings/leds/common.txt system-status { · line 39

Quoted 13 lines
Documentation/devicetree/bindings/leds/common.txt +7 -0
 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

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#11 lore raw
In reply to Pavel Machek

Hi Pavel,

Quoted 15 lines · Pavel Machek

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..

Documentation/devicetree/bindings/leds/common.txt +0 -0
index 2d88816..e9acbbc 100644

Documentation/devicetree/bindings/leds/common.txt Optional properties for child nodes: · line 23

Quoted 10 lines
Documentation/devicetree/bindings/leds/common.txt +7 -0
@@ -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.

Signature · 4 lines
Regards,

Sakari Ailus
e-mail: [email protected]	XMPP: [email protected]
#12 lore raw

Hi!

Quoted 10 lines · Sakari Ailus
Quoted 8 lines · Pavel Machek
Documentation/devicetree/bindings/leds/common.txt +0 -0
index 2d88816..e9acbbc 100644
@@ -14,6 +14,15 @@ Optional properties for child nodes:
      "ide-disk" - LED indicates disk activity
      "timer" - LED flashes at a fixed, configurable rate
 
Quoted 10 lines

Documentation/devicetree/bindings/leds/common.txt Optional properties for child nodes: · line 23

Quoted 7 lines
Documentation/devicetree/bindings/leds/common.txt +7 -0
+- 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

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#13 lore raw

Hi Pavel,

Quoted 24 lines · Pavel Machek

Hi!

Quoted 10 lines · Sakari Ailus
Quoted 8 lines · Pavel Machek
Documentation/devicetree/bindings/leds/common.txt +0 -0
index 2d88816..e9acbbc 100644
@@ -14,6 +14,15 @@ Optional properties for child nodes:
      "ide-disk" - LED indicates disk activity
      "timer" - LED flashes at a fixed, configurable rate
 
Quoted 10 lines

Documentation/devicetree/bindings/leds/common.txt Optional properties for child nodes: · line 23

Quoted 7 lines
Documentation/devicetree/bindings/leds/common.txt +7 -0
+- 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.

Quoted 3 lines

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.

Signature · 4 lines
Kind regards,

Sakari Ailus
e-mail: [email protected]	XMPP: [email protected]
#14 lore raw
Quoted 27 lines · Sakari Ailus

Hi Pavel,

Quoted 24 lines · Pavel Machek

Hi!

Quoted 20 lines · Sakari Ailus
Quoted 5 lines · Pavel Machek
Documentation/devicetree/bindings/leds/common.txt +0 -0
index 2d88816..e9acbbc 100644

Documentation/devicetree/bindings/leds/common.txt Optional properties for child nodes: · line 23

Quoted 10 lines
Documentation/devicetree/bindings/leds/common.txt +7 -0
@@ -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.

Quoted 6 lines
Quoted 3 lines

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 <[email protected]> wanted me to get your ack. Can I have one?

Quoted 4 lines

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

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#15 lore raw
In reply to Sakari Ailus

Hi Pavel, Sakari,

Quoted 21 lines · Sakari Ailus

Hi Pavel,

Quoted 18 lines · Pavel Machek

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..

Documentation/devicetree/bindings/leds/common.txt +0 -0
index 2d88816..e9acbbc 100644
@@ -14,6 +14,15 @@ Optional properties for child nodes:
       "ide-disk" - LED indicates disk activity
       "timer" - LED flashes at a fixed, configurable rate
 
Quoted 11 lines

Documentation/devicetree/bindings/leds/common.txt Optional properties for child nodes: · line 23

Quoted 7 lines
Documentation/devicetree/bindings/leds/common.txt +7 -0
+- 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

#16 lore raw

Hi Jacek,

Quoted 7 lines · Jacek Anaszewski
Quoted 3 lines

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.

Signature · 2 lines
Sakari Ailus
e-mail: [email protected]	XMPP: [email protected]
#17 lore raw
In reply to Jacek Anaszewski

Hi Jacek,

Quoted 36 lines · Jacek Anaszewski

Hi Pavel, Sakari,

Quoted 21 lines · Sakari Ailus

Hi Pavel,

Quoted 18 lines · Pavel Machek

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..

Documentation/devicetree/bindings/leds/common.txt +0 -0
index 2d88816..e9acbbc 100644
@@ -14,6 +14,15 @@ Optional properties for child nodes:
      "ide-disk" - LED indicates disk activity
      "timer" - LED flashes at a fixed, configurable rate
 
Quoted 11 lines

Documentation/devicetree/bindings/leds/common.txt Optional properties for child nodes: · line 23

Quoted 7 lines
Documentation/devicetree/bindings/leds/common.txt +7 -0
+- 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.

Quoted 3 lines

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.

Signature · 2 lines
Sakari Ailus
e-mail: [email protected]	XMPP: [email protected]
Acked-by on v1 1/1
#18 lore raw
In reply to Pavel Machek

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:

Best Regards,
Jacek Anaszewski

Quoted 42 lines · Pavel Machek

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..

Documentation/devicetree/bindings/leds/common.txt +16 -0
index 2d88816..e9acbbc 100644
@@ -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>;
+}
#19 lore raw

PATCH 1/1 DT: leds: Add flash LED devices related properties

In reply to Pavel Machek

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.

---

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..

Documentation/devicetree/bindings/leds/common.txt +16 -0
index 2d88816..e9acbbc 100644
@@ -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>;
+}
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#20 lore raw

Re: [PATCH w/ acks] DT: leds: Add flash LED devices related properties

Quoted 9 lines · Pavel Machek

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.

Thanks a lot, let me wait for one ack from Device Tree maintainers, as it's a pure device tree patch.

Rob, can you help to give a review and ack?

-Bryan

Quoted 43 lines

---

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..

Documentation/devicetree/bindings/leds/common.txt +16 -1
index 2d88816..e9acbbc 100644
@@ -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>;
+}
 
 
--

(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

#21 lore raw

Re: [PATCH w/ acks] DT: leds: Add flash LED devices related properties

Quoted 6 lines · Bryan Wu
Quoted 5 lines · Pavel Machek

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.

Quoted 7 lines
Quoted 4 lines

Thanks a lot, let me wait for one ack from Device Tree maintainers, as it's a pure device tree patch.

Well, it looks like device tree maintainers don't care. But the patch is not obviously bad, because they'd scream bloody murder by now...

Quoted 1 line

Rob, can you help to give a review and ack?

...so can we get it in, please?

Pavel

Quoted 41 lines
Quoted 41 lines

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..

Documentation/devicetree/bindings/leds/common.txt +16 -1
index 2d88816..e9acbbc 100644
@@ -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>;
+}
 
 
--

(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Acked-by on v1 1/1
#22 lore raw

Re: [PATCH w/ acks] DT: leds: Add flash LED devices related properties

In reply to Pavel Machek
Quoted 8 lines · Pavel Machek

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.

One minor comment, otherwise:

Quoted 13 lines

---

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..

Documentation/devicetree/bindings/leds/common.txt +0 -0
index 2d88816..e9acbbc 100644

Documentation/devicetree/bindings/leds/common.txt Optional properties for child nodes: · line 23

Quoted 10 lines
Documentation/devicetree/bindings/leds/common.txt +7 -0
@@ -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

Use 'us' as it is more common than microsec.

We probably should have done 'uamp' to be consistent in this binding, but regulator binding is using microamp.

Rob

#23 lore raw

Re: [PATCH w/ acks] DT: leds: Add flash LED devices related properties

Quoted 6 lines · Rob Herring
Quoted 5 lines · Pavel Machek

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.

Quoted 7 lines
Quoted 3 lines

One minor comment, otherwise:

Thanks, I sent and updated version.

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html