Skip to contentSkip to conversation

iio: health: max30100: add config for LED current

PATCH In review Matt Ranostay 3 participants 3 messages Dec 30, 2015 – Jan 3, 2016 1 message not in the archive

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

PATCH v2 1/1 iio: health: max30100: add config for LED current

Allow the current for both RED and IR LEDs to be set via an device tree property setting.

This is an optional setting that is useful for applications that have a known glass attenuation factor.

---
Changes from v2:
* change to use microamp property name from LED class
* updated documentation for new format
* added allowed current index map

.../devicetree/bindings/iio/health/max30100.txt | 8 +++

 drivers/iio/health/max30100.c                      | 81 ++++++++++++++++++++--
 2 files changed, 83 insertions(+), 6 deletions(-)
Documentation/devicetree/bindings/iio/health/max30100.txt +8 -0
index f6fbac6..4eef96e 100644
@@ -11,11 +11,19 @@ Required properties:
   Refer to interrupt-controller/interrupts.txt for generic
   interrupt client node bindings.
 
+Optional properties:
+  - maxim,led-current-microamp: configuration for LED current in microamperes
+    while the engine is running. First indexed value is the configuration for
+    the RED LED, and second value is for the IR LED.
+
+    Refer to the datasheet for the allowed current values.
+
 Example:
 
 max30100@057 {
 	compatible = "maxim,max30100";
 	reg = <57>;
+	maxim,led-current-microamp = <24000 50000>;
 	interrupt-parent = <&gpio1>;
 	interrupts = <16 2>;
 };
drivers/iio/health/max30100.c +75 -6

115 lines not on this page · raw message

Signature · 1 line
2.6.4
Acked-by
#2 lore raw
In reply to a message not in the archive
Quoted 13 lines · Matt Ranostay

Allow the current for both RED and IR LEDs to be set via an device tree property setting.

This is an optional setting that is useful for applications that have a known glass attenuation factor.

---
Changes from v2:
* change to use microamp property name from LED class
* updated documentation for new format
* added allowed current index map

Quoted 3 lines

.../devicetree/bindings/iio/health/max30100.txt | 8 +++

 drivers/iio/health/max30100.c                      | 81 ++++++++++++++++++++--
 2 files changed, 83 insertions(+), 6 deletions(-)
#3 lore raw
Quoted 14 lines · Rob Herring
Quoted 13 lines · Matt Ranostay

Allow the current for both RED and IR LEDs to be set via an device tree property setting.

This is an optional setting that is useful for applications that have a known glass attenuation factor.

---
Changes from v2:
* change to use microamp property name from LED class
* updated documentation for new format
* added allowed current index map

Quoted 5 lines
Quoted 3 lines

.../devicetree/bindings/iio/health/max30100.txt | 8 +++

 drivers/iio/health/max30100.c                      | 81 ++++++++++++++++++++--
 2 files changed, 83 insertions(+), 6 deletions(-)

Looks good to me as well. Applied to the togreg branch of iio.git - initially pushed out as testing for the autobuilders to play with it.

Thanks,

Jonathan

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html