Skip to contentSkip to conversation

DT: leds: Add flash LED devices related properties (fwd)

PATCH Superseded Pavel Machek 2 participants 3 messages Dec 22, 2014

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 DT: leds: Add flash LED devices related properties (fwd)

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

Rob Herring requested to change microsec to us.

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-us : 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
Quoted 40 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.

---

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

Rob Herring requested to change microsec to us.

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-us : timeout in microseconds after which the flash
+                     LED is turned off
+
+
 Examples:
 
 system-status {

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

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

Looks like you forget to update this flash-timeout-microsec to flash-timeout-us? And I think changing -microamp to -uamp is more consistent here.

Quoted 7 lines

+}

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

#2 lore raw
Quoted 39 lines · Bryan Wu
Quoted 38 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.

---

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

Rob Herring requested to change microsec to us.

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-us : timeout in microseconds after which the flash
+                     LED is turned off
+
+
 Examples:
 
Quoted 14 lines

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

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

Looks like you forget to update this flash-timeout-microsec to flash-timeout-us? And I think changing -microamp to -uamp is more consistent here.

No, we want to be consistent with regulators, as Rob agreed.

You have v3 in the mailbox.
Pavel

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