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

Subsystems: led subsystem, open firmware and flattened device tree bindings, the rest

STALE4259d

24 messages, 5 authors, 2014-12-22 · open the first message on its own page

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

From: Pavel Machek <hidden>
Date: 2014-11-20 13:17:13

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 <redacted>
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>;
+}
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Re: [PATCH] Add attributes neccessary for LED flashes to devicetree/bindings/leds/common.txt

From: Jacek Anaszewski <hidden>
Date: 2014-11-20 13:38:11

Hi Pavel,

On 11/20/2014 02:17 PM, Pavel Machek wrote:
quoted hunk
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 <redacted>
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?

Re: [PATCH] Add attributes neccessary for LED flashes to devicetree/bindings/leds/common.txt

From: Jacek Anaszewski <hidden>
Date: 2014-11-20 14:48:26

On 11/20/2014 02:38 PM, Jacek Anaszewski wrote:
Hi Pavel,

On 11/20/2014 02:17 PM, Pavel Machek wrote:
quoted
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 <redacted>
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

Re: [PATCH] Add attributes neccessary for LED flashes to devicetree/bindings/leds/common.txt

From: Sakari Ailus <sakari.ailus@iki.fi>
Date: 2014-11-20 15:03:49

Hi Pavel,

On Thu, Nov 20, 2014 at 02:17:13PM +0100, Pavel Machek wrote:
quoted hunk
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 <redacted>
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.

-- 
Regards,

Sakari Ailus
e-mail: sakari.ailus@iki.fi	XMPP: sailus@retiisi.org.uk

Re: [PATCH] Add attributes neccessary for LED flashes to devicetree/bindings/leds/common.txt

From: Pavel Machek <hidden>
Date: 2014-11-20 19:19:19

On Thu 2014-11-20 14:38:11, Jacek Anaszewski wrote:
Hi Pavel,

On 11/20/2014 02:17 PM, Pavel Machek wrote:
quoted
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 <redacted>
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



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

Re: [PATCH] Add attributes neccessary for LED flashes to devicetree/bindings/leds/common.txt

From: Pavel Machek <hidden>
Date: 2014-11-20 20:52:55

On Thu 2014-11-20 15:48:26, Jacek Anaszewski wrote:
On 11/20/2014 02:38 PM, Jacek Anaszewski wrote:
quoted
Hi Pavel,

On 11/20/2014 02:17 PM, Pavel Machek wrote:
quoted
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
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Re: [PATCH] Add attributes neccessary for LED flashes to devicetree/bindings/leds/common.txt

From: Pavel Machek <hidden>
Date: 2014-11-20 20:53:50

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:
quoted
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
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Re: [PATCH] Add attributes neccessary for LED flashes to devicetree/bindings/leds/common.txt

From: Jacek Anaszewski <hidden>
Date: 2014-11-21 07:38:33

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:
quoted
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 <redacted>
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

Re: [PATCH] Add attributes neccessary for LED flashes to devicetree/bindings/leds/common.txt

From: Sakari Ailus <sakari.ailus@iki.fi>
Date: 2014-11-21 07:39:06

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:
quoted
On Thu, Nov 20, 2014 at 02:17:13PM +0100, Pavel Machek wrote:
quoted
quoted
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.

-- 
Kind regards,

Sakari Ailus
e-mail: sakari.ailus@iki.fi	XMPP: sailus@retiisi.org.uk

Re: [PATCH] Add attributes neccessary for LED flashes to devicetree/bindings/leds/common.txt

From: Sakari Ailus <sakari.ailus@iki.fi>
Date: 2014-11-21 07:40:38

Hi Jacek,

On Fri, Nov 21, 2014 at 08:38:33AM +0100, Jacek Anaszewski wrote:
quoted
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.

-- 
Sakari Ailus
e-mail: sakari.ailus@iki.fi	XMPP: sailus@retiisi.org.uk

Re: [PATCH] Add attributes neccessary for LED flashes to devicetree/bindings/leds/common.txt

From: Jacek Anaszewski <hidden>
Date: 2014-11-21 08:15:31

Hi Pavel,

On 11/20/2014 09:52 PM, Pavel Machek wrote:
On Thu 2014-11-20 15:48:26, Jacek Anaszewski wrote:
quoted
On 11/20/2014 02:38 PM, Jacek Anaszewski wrote:
quoted
Hi Pavel,

On 11/20/2014 02:17 PM, Pavel Machek wrote:
quoted
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
Actually, we've agreed with Sakari that we can handle
indicator-pattern later.
Good.
quoted
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

Re: [PATCH] Add attributes neccessary for LED flashes to devicetree/bindings/leds/common.txt

From: Pavel Machek <hidden>
Date: 2014-11-24 22:53:19

On Fri 2014-11-21 09:15:31, Jacek Anaszewski wrote:
Hi Pavel,

On 11/20/2014 09:52 PM, Pavel Machek wrote:
quoted
On Thu 2014-11-20 15:48:26, Jacek Anaszewski wrote:
quoted
On 11/20/2014 02:38 PM, Jacek Anaszewski wrote:
quoted
Hi Pavel,

On 11/20/2014 02:17 PM, Pavel Machek wrote:
quoted
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
Actually, we've agreed with Sakari that we can handle
indicator-pattern later.
Good.
quoted
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
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Re: [PATCH] Add attributes neccessary for LED flashes to devicetree/bindings/leds/common.txt

From: Bryan Wu <hidden>
Date: 2014-11-26 06:09:49

On Mon, Nov 24, 2014 at 2:53 PM, Pavel Machek [off-list ref] wrote:
On Fri 2014-11-21 09:15:31, Jacek Anaszewski wrote:
quoted
Hi Pavel,

On 11/20/2014 09:52 PM, Pavel Machek wrote:
quoted
On Thu 2014-11-20 15:48:26, Jacek Anaszewski wrote:
quoted
On 11/20/2014 02:38 PM, Jacek Anaszewski wrote:
quoted
Hi Pavel,

On 11/20/2014 02:17 PM, Pavel Machek wrote:
quoted
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
Actually, we've agreed with Sakari that we can handle
indicator-pattern later.
Good.
quoted
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

Re: [PATCH] Add attributes neccessary for LED flashes to devicetree/bindings/leds/common.txt

From: Jacek Anaszewski <hidden>
Date: 2014-11-26 07:57:55

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


Best Regards,
Jacek Anaszewski


On 11/20/2014 02:17 PM, Pavel Machek wrote:
quoted hunk
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 <redacted>
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>;
+}

Re: [PATCH] Add attributes neccessary for LED flashes to devicetree/bindings/leds/common.txt

From: Pavel Machek <hidden>
Date: 2014-11-26 12:47:26

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:
quoted
Hi!

On Thu 2014-11-20 17:03:49, Sakari Ailus wrote:
quoted
On Thu, Nov 20, 2014 at 02:17:13PM +0100, Pavel Machek wrote:
quoted
quoted
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 [off-list ref]
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
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Re: [PATCH] Add attributes neccessary for LED flashes to devicetree/bindings/leds/common.txt

From: Pavel Machek <hidden>
Date: 2014-12-03 15:51:55

On Tue 2014-11-25 22:09:49, Bryan Wu wrote:
On Mon, Nov 24, 2014 at 2:53 PM, Pavel Machek [off-list ref] wrote:
quoted
On Fri 2014-11-21 09:15:31, Jacek Anaszewski wrote:
quoted
Hi Pavel,

On 11/20/2014 09:52 PM, Pavel Machek wrote:
quoted
On Thu 2014-11-20 15:48:26, Jacek Anaszewski wrote:
quoted
On 11/20/2014 02:38 PM, Jacek Anaszewski wrote:
quoted
Hi Pavel,

On 11/20/2014 02:17 PM, Pavel Machek wrote:
quoted
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
Actually, we've agreed with Sakari that we can handle
indicator-pattern later.
Good.
quoted
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
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Re: [PATCH] Add attributes neccessary for LED flashes to devicetree/bindings/leds/common.txt

From: Sakari Ailus <sakari.ailus@iki.fi>
Date: 2014-12-03 16:03:52

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:
quoted
Hi Pavel,

On Thu, Nov 20, 2014 at 02:17:13PM +0100, Pavel Machek wrote:
quoted
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 <redacted>
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.

-- 
Sakari Ailus
e-mail: sakari.ailus@iki.fi	XMPP: sailus@retiisi.org.uk

Re: [PATCH] Add attributes neccessary for LED flashes to devicetree/bindings/leds/common.txt

From: Sakari Ailus <sakari.ailus@iki.fi>
Date: 2014-12-03 16:10:41

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:
quoted
On Mon, Nov 24, 2014 at 2:53 PM, Pavel Machek [off-list ref] wrote:
quoted
On Fri 2014-11-21 09:15:31, Jacek Anaszewski wrote:
quoted
Hi Pavel,

On 11/20/2014 09:52 PM, Pavel Machek wrote:
quoted
On Thu 2014-11-20 15:48:26, Jacek Anaszewski wrote:
quoted
On 11/20/2014 02:38 PM, Jacek Anaszewski wrote:
quoted
Hi Pavel,

On 11/20/2014 02:17 PM, Pavel Machek wrote:
quoted
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
Actually, we've agreed with Sakari that we can handle
indicator-pattern later.
Good.
quoted
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.

-- 
Kind regards,

Sakari Ailus
e-mail: sakari.ailus@iki.fi	XMPP: sailus@retiisi.org.uk

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

From: Pavel Machek <hidden>
Date: 2014-12-03 18:57:46

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.

Signed-off-by: Pavel Machek <redacted>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Jacek Anaszewski <redacted>

---

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

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>;
+}

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

Re: [PATCH] Add attributes neccessary for LED flashes to devicetree/bindings/leds/common.txt

From: Pavel Machek <hidden>
Date: 2014-12-03 18:58:22

On Tue 2014-11-25 22:09:49, Bryan Wu wrote:
On Mon, Nov 24, 2014 at 2:53 PM, Pavel Machek [off-list ref] wrote:
quoted
On Fri 2014-11-21 09:15:31, Jacek Anaszewski wrote:
quoted
Hi Pavel,

On 11/20/2014 09:52 PM, Pavel Machek wrote:
quoted
On Thu 2014-11-20 15:48:26, Jacek Anaszewski wrote:
quoted
On 11/20/2014 02:38 PM, Jacek Anaszewski wrote:
quoted
Hi Pavel,

On 11/20/2014 02:17 PM, Pavel Machek wrote:
quoted
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
Actually, we've agreed with Sakari that we can handle
indicator-pattern later.
Good.
quoted
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
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

From: Bryan Wu <hidden>
Date: 2014-12-03 19:03:59

On Wed, Dec 3, 2014 at 10:57 AM, Pavel Machek [off-list ref] wrote:
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.

Signed-off-by: Pavel Machek <redacted>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Jacek Anaszewski <redacted>
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 hunk
---

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

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>;
+}


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

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

From: Pavel Machek <hidden>
Date: 2014-12-20 15:02:52

On Wed 2014-12-03 11:03:59, Bryan Wu wrote:
On Wed, Dec 3, 2014 at 10:57 AM, Pavel Machek [off-list ref] wrote:
quoted
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.

Signed-off-by: Pavel Machek <redacted>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Jacek Anaszewski <redacted>
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...
Rob, can you help to give a review and ack?
...so can we get it in, please?

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

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>;
+}


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

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

From: Rob Herring <hidden>
Date: 2014-12-22 02:27:46

On Wed, Dec 3, 2014 at 12:57 PM, Pavel Machek [off-list ref] wrote:
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.

Signed-off-by: Pavel Machek <redacted>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Jacek Anaszewski <redacted>
One minor comment, otherwise:

Acked-by: Rob Herring <robh@kernel.org>
quoted hunk
---

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

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

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

From: Pavel Machek <hidden>
Date: 2014-12-22 11:45:32

On Sun 2014-12-21 20:27:46, Rob Herring wrote:
On Wed, Dec 3, 2014 at 12:57 PM, Pavel Machek [off-list ref] wrote:
quoted
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.

Signed-off-by: Pavel Machek <redacted>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Jacek Anaszewski <redacted>
One minor comment, otherwise:

Acked-by: Rob Herring <robh@kernel.org>

Thanks, I sent and updated version.

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help