Skip to contentSkip to conversation

Documentation: leds: Add description of v4l2-flash sub-device

PATCH Superseded Jacek Anaszewski 4 participants 9 messages Mar 30, 2015 – Mar 31, 2015 1 message not in the archive

Subsystems (5)

v3 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#1 lore raw

PATCH v3 1/1 DT: Add documentation for the mfd Maxim max77693

In reply to Jacek Anaszewski

This patch adds device tree binding documentation for the flash cell of the Maxim max77693 multifunctional device.

---
 Documentation/devicetree/bindings/mfd/max77693.txt |   63 ++++++++++++++++++++
 1 file changed, 63 insertions(+)

- added range to maxim,boost-mvout and maxim,mvsys-min description

Documentation/devicetree/bindings/mfd/max77693.txt +63 -0
index 38e6440..3d2103a 100644
@@ -76,7 +76,55 @@ Optional properties:
     Valid values: 4300000, 4700000, 4800000, 4900000
     Default: 4300000
 
+- led : the LED submodule device node
+
+There are two LED outputs available - FLED1 and FLED2. Each of them can
+control a separate LED or they can be connected together to double
+the maximum current for a single connected LED. One LED is represented
+by one child node.
+
+Required properties:
+- compatible : Must be "maxim,max77693-led".
+
+Optional properties:
+- maxim,trigger-type : Flash trigger type.
+	Possible trigger types:
+		LEDS_TRIG_TYPE_EDGE (0) - Rising edge of the signal triggers
+			the flash,
+		LEDS_TRIG_TYPE_LEVEL (1) - Strobe pulse length controls duration
+			of the flash.
+- maxim,boost-mode :
+	In boost mode the device can produce up to 1.2A of total current
+	on both outputs. The maximum current on each output is reduced
+	to 625mA then. If not enabled explicitly, boost setting defaults to
+	LEDS_BOOST_FIXED in case both current sources are used.
+	Possible values:
+		LEDS_BOOST_OFF (0) - no boost,
+		LEDS_BOOST_ADAPTIVE (1) - adaptive mode,
+		LEDS_BOOST_FIXED (2) - fixed mode.
+- maxim,boost-mvout : Output voltage of the boost module in millivolts.
+		Range: 3300 - 5500
+- maxim,mvsys-min : Low input voltage level in millivolts. Flash is not fired
+	if chip estimates that system voltage could drop below this level due
+	to flash power consumption.
+		Range: 2400 - 3400
+
+Required properties of the LED child node:
+- led-sources : see Documentation/devicetree/bindings/leds/common.txt;
+		device current output identifiers: 0 - FLED1, 1 - FLED2
+
+Optional properties of the LED child node:
+- label : see Documentation/devicetree/bindings/leds/common.txt
+- max-microamp : see Documentation/devicetree/bindings/leds/common.txt
+		Range: 15625 - 250000
+- flash-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
+		Range: 15625 - 1000000
+- flash-timeout-us : see Documentation/devicetree/bindings/leds/common.txt
+		Range: 62500 - 1000000
+
 Example:
+#include <dt-bindings/leds/common.h>
+
 	max77693@66 {
 		compatible = "maxim,max77693";
 		reg = <0x66>;
@@ -117,5 +165,20 @@ Example:
 			maxim,thermal-regulation-celsius = <75>;
 			maxim,battery-overcurrent-microamp = <3000000>;
 			maxim,charge-input-threshold-microvolt = <4300000>;
+
+		led {
+			compatible = "maxim,max77693-led";
+			maxim,trigger-type = <LEDS_TRIG_TYPE_LEVEL>;
+			maxim,boost-mode = <LEDS_BOOST_FIXED>;
+			maxim,boost-mvout = <5000>;
+			maxim,mvsys-min = <2400>;
+
+			camera_flash: flash-led {
+				label = "max77693-flash";
+				led-sources = <0>, <1>;
+				max-microamp = <500000>;
+				flash-max-microamp = <1250000>;
+				flash-timeout-us = <1000000>;
+			};
 		};
 	};
Signature · 1 line
1.7.9.5
#9 lore raw

PATCH v3 1/1 leds: Add support for max77693 mfd flash cell

In reply to Jacek Anaszewski

This patch adds led-flash support to Maxim max77693 chipset. A device can be exposed to user space through LED subsystem sysfs interface. Device supports up to two leds which can work in flash and torch mode. The leds can be triggered externally or by software.

---
 drivers/leds/Kconfig         |   10 +
 drivers/leds/Makefile        |    1 +
 drivers/leds/leds-max77693.c |  972 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 983 insertions(+)
 create mode 100644 drivers/leds/leds-max77693.c

- removed not needed '#include <asm/div64.h>' directive

drivers/leds/Kconfig +10 -0
index 966b960..f9fbeb5 100644
@@ -467,6 +467,16 @@ config LEDS_TCA6507
 	  LED driver chips accessed via the I2C bus.
 	  Driver support brightness control and hardware-assisted blinking.
 
+config LEDS_MAX77693
+	tristate "LED support for MAX77693 Flash"
+	depends on LEDS_CLASS_FLASH
+	depends on MFD_MAX77693
+	depends on OF
+	help
+	  This option enables support for the flash part of the MAX77693
+	  multifunction device. It has build in control for two leds in flash
+	  and torch mode.
+
 config LEDS_MAX8997
 	tristate "LED support for MAX8997 PMIC"
 	depends on LEDS_CLASS && MFD_MAX8997
drivers/leds/Makefile +1 -0
index bf46093..9413fdb 100644
@@ -52,6 +52,7 @@ obj-$(CONFIG_LEDS_MC13783)		+= leds-mc13783.o
 obj-$(CONFIG_LEDS_NS2)			+= leds-ns2.o
 obj-$(CONFIG_LEDS_NETXBIG)		+= leds-netxbig.o
 obj-$(CONFIG_LEDS_ASIC3)		+= leds-asic3.o
+obj-$(CONFIG_LEDS_MAX77693)		+= leds-max77693.o
 obj-$(CONFIG_LEDS_MAX8997)		+= leds-max8997.o
 obj-$(CONFIG_LEDS_LM355x)		+= leds-lm355x.o
 obj-$(CONFIG_LEDS_BLINKM)		+= leds-blinkm.o
drivers/leds/leds-max77693.c new file +972 -0

972 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#0 lore raw

PATCH v3 1/1 Documentation: leds: Add description of v4l2-flash sub-device

This patch extends LED Flash class documention by the description of interactions with v4l2-flash sub-device.

---
 Documentation/leds/leds-class-flash.txt |   46 +++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

- extended description of v4l2_flash API

Documentation/leds/leds-class-flash.txt +46 -0
index 19bb673..9d45667 100644
@@ -20,3 +20,49 @@ Following sysfs attributes are exposed for controlling flash LED devices:
 	- max_flash_timeout
 	- flash_strobe
 	- flash_fault
+
+
+V4L2 Flash wrapper for flash LEDs
+=================================
+
+A LED subsystem driver can be controlled also from the level of VideoForLinux2
+subsystem. In order to enable this CONFIG_V4L2_FLASH_LED_CLASS symbol has to
+be defined in the kernel config.
+
+The driver must call the v4l2_flash_init function to get registered in the
+V4L2 subsystem. The function takes three arguments:
+- fled_cdev : the LED Flash class device to wrap
+- ops : V4L2 specific ops
+	* external_strobe_set - defines the source of the flash LED strobe -
+		V4L2_CID_FLASH_STROBE control or external source, typically
+		a sensor, which makes it possible to synchronise the flash
+		strobe start with exposure start,
+	* intensity_to_led_brightness and led_brightness_to_intensity - perform
+		enum led_brightness <-> V4L2 intensity conversion in a device
+		specific manner - they can be used for devices with non-linear
+		LED current scale.
+- config : configuration for V4L2 Flash sub-device
+	* dev_name - the name of the media entity, unique in the system,
+	* flash_faults - bitmask of flash faults that the LED Flash class
+		device can report; corresponding LED_FAULT* bit definitions are
+		available in <linux/led-class-flash.h>,
+	* intensity - constraints for the LED in the TORCH or INDICATOR mode,
+		in microamperes,
+	* has_external_strobe - external strobe capability,
+	* indicator_led - signifies that a led is of indicator type, which
+		implies that it can have only two V4L2 controls:
+		V4L2_CID_FLASH_INDICATOR_INTENSITY and V4L2_CID_FLASH_FAULT.
+
+On remove the v4l2_flash_release function has to be called, which takes one
+argument - struct v4l2_flash pointer returned previously by v4l2_flash_init.
+
+Please refer to the drivers/leds/leds-max77693.c for an exemplary usage of the
+v4l2-flash API.
+
+Once the V4L2 sub-device is registered by the driver which created the Media
+controller device, the sub-device node acts just as a node of a native V4L2
+flash API device would. The calls are simply routed to the LED flash API.
+
+Opening the V4L2 Flash sub-device makes the LED subsystem sysfs interface
+unavailable. The interface is re-enabled after the V4L2 Flash sub-device
+is closed.
Signature · 1 line
1.7.9.5
#3 lore raw

Re: [PATCH v3] DT: Add documentation for the mfd Maxim max77693

In reply to a message not in the archive
Quoted 33 lines · Jacek Anaszewski

This patch adds device tree binding documentation for the flash cell of the Maxim max77693 multifunctional device.

---
 Documentation/devicetree/bindings/mfd/max77693.txt |   63 ++++++++++++++++++++
 1 file changed, 63 insertions(+)

- added range to maxim,boost-mvout and maxim,mvsys-min description

Documentation/devicetree/bindings/mfd/max77693.txt +7 -0
index 38e6440..3d2103a 100644
@@ -76,7 +76,55 @@ Optional properties:
     Valid values: 4300000, 4700000, 4800000, 4900000
     Default: 4300000
 
+- led : the LED submodule device node
+
+There are two LED outputs available - FLED1 and FLED2. Each of them can
+control a separate LED or they can be connected together to double
+the maximum current for a single connected LED. One LED is represented
+by one child node.
+

Documentation/devicetree/bindings/mfd/max77693.txt Optional properties: · line 95

Quoted 10 lines
Documentation/devicetree/bindings/mfd/max77693.txt +10 -0
+Required properties:
+- compatible : Must be "maxim,max77693-led".
+
+Optional properties:
+- maxim,trigger-type : Flash trigger type.
+	Possible trigger types:
+		LEDS_TRIG_TYPE_EDGE (0) - Rising edge of the signal triggers
+			the flash,
+		LEDS_TRIG_TYPE_LEVEL (1) - Strobe pulse length controls duration
+			of the flash.

Surely this is required? What should be assumed if this property isn't present?

Otherwise this looks OK, but I'm not that familiar with LED/flash bindings.

Mark.

Quoted 64 lines
Documentation/devicetree/bindings/mfd/max77693.txt +46 -0
+- maxim,boost-mode :
+	In boost mode the device can produce up to 1.2A of total current
+	on both outputs. The maximum current on each output is reduced
+	to 625mA then. If not enabled explicitly, boost setting defaults to
+	LEDS_BOOST_FIXED in case both current sources are used.
+	Possible values:
+		LEDS_BOOST_OFF (0) - no boost,
+		LEDS_BOOST_ADAPTIVE (1) - adaptive mode,
+		LEDS_BOOST_FIXED (2) - fixed mode.
+- maxim,boost-mvout : Output voltage of the boost module in millivolts.
+		Range: 3300 - 5500
+- maxim,mvsys-min : Low input voltage level in millivolts. Flash is not fired
+	if chip estimates that system voltage could drop below this level due
+	to flash power consumption.
+		Range: 2400 - 3400
+
+Required properties of the LED child node:
+- led-sources : see Documentation/devicetree/bindings/leds/common.txt;
+		device current output identifiers: 0 - FLED1, 1 - FLED2
+
+Optional properties of the LED child node:
+- label : see Documentation/devicetree/bindings/leds/common.txt
+- max-microamp : see Documentation/devicetree/bindings/leds/common.txt
+		Range: 15625 - 250000
+- flash-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
+		Range: 15625 - 1000000
+- flash-timeout-us : see Documentation/devicetree/bindings/leds/common.txt
+		Range: 62500 - 1000000
+
 Example:
+#include <dt-bindings/leds/common.h>
+
 	max77693@66 {
 		compatible = "maxim,max77693";
 		reg = <0x66>;
@@ -117,5 +165,20 @@ Example:
 			maxim,thermal-regulation-celsius = <75>;
 			maxim,battery-overcurrent-microamp = <3000000>;
 			maxim,charge-input-threshold-microvolt = <4300000>;
+
+		led {
+			compatible = "maxim,max77693-led";
+			maxim,trigger-type = <LEDS_TRIG_TYPE_LEVEL>;
+			maxim,boost-mode = <LEDS_BOOST_FIXED>;
+			maxim,boost-mvout = <5000>;
+			maxim,mvsys-min = <2400>;
+
+			camera_flash: flash-led {
+				label = "max77693-flash";
+				led-sources = <0>, <1>;
+				max-microamp = <500000>;
+				flash-max-microamp = <1250000>;
+				flash-timeout-us = <1000000>;
+			};
 		};
 	};
Signature · 6 lines
1.7.9.5

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

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

#4 lore raw

Re: [PATCH v3] DT: Add documentation for the mfd Maxim max77693

Quoted 39 lines · Mark Rutland
Quoted 38 lines · Jacek Anaszewski

This patch adds device tree binding documentation for the flash cell of the Maxim max77693 multifunctional device.

---
  Documentation/devicetree/bindings/mfd/max77693.txt |   63 ++++++++++++++++++++
  1 file changed, 63 insertions(+)

- added range to maxim,boost-mvout and maxim,mvsys-min description

Documentation/devicetree/bindings/mfd/max77693.txt +12 -0
index 38e6440..3d2103a 100644
@@ -76,7 +76,55 @@ Optional properties:
      Valid values: 4300000, 4700000, 4800000, 4900000
      Default: 4300000
 
+- led : the LED submodule device node
+
+There are two LED outputs available - FLED1 and FLED2. Each of them can
+control a separate LED or they can be connected together to double
+the maximum current for a single connected LED. One LED is represented
+by one child node.
+
+Required properties:
+- compatible : Must be "maxim,max77693-led".
+
+Optional properties:
+- maxim,trigger-type : Flash trigger type.
Quoted 8 lines

Documentation/devicetree/bindings/mfd/max77693.txt Optional properties: · line 95

Quoted 5 lines
Documentation/devicetree/bindings/mfd/max77693.txt +5 -0
+	Possible trigger types:
+		LEDS_TRIG_TYPE_EDGE (0) - Rising edge of the signal triggers
+			the flash,
+		LEDS_TRIG_TYPE_LEVEL (1) - Strobe pulse length controls duration
+			of the flash.

Surely this is required? What should be assumed if this property isn't present?

LEDS_TRIG_TYPE_LEVEL allows for an ISP to do e.g. short flash blink before the actual strobe - it is used for eliminating photographs with closed eyes, or can serve for probing ambient light conditions.

With LEDS_TRIG_TYPE_EDGE flash strobe is triggered on rising edge and lasts until programmed timeout expires.

This setting is tightly related to a camera sensor, which generates the strobe signal. Effectively it depends on board configuration.

Quoted 74 lines

Otherwise this looks OK, but I'm not that familiar with LED/flash bindings.

Mark.

Quoted 59 lines
Documentation/devicetree/bindings/mfd/max77693.txt +46 -1
+- maxim,boost-mode :
+	In boost mode the device can produce up to 1.2A of total current
+	on both outputs. The maximum current on each output is reduced
+	to 625mA then. If not enabled explicitly, boost setting defaults to
+	LEDS_BOOST_FIXED in case both current sources are used.
+	Possible values:
+		LEDS_BOOST_OFF (0) - no boost,
+		LEDS_BOOST_ADAPTIVE (1) - adaptive mode,
+		LEDS_BOOST_FIXED (2) - fixed mode.
+- maxim,boost-mvout : Output voltage of the boost module in millivolts.
+		Range: 3300 - 5500
+- maxim,mvsys-min : Low input voltage level in millivolts. Flash is not fired
+	if chip estimates that system voltage could drop below this level due
+	to flash power consumption.
+		Range: 2400 - 3400
+
+Required properties of the LED child node:
+- led-sources : see Documentation/devicetree/bindings/leds/common.txt;
+		device current output identifiers: 0 - FLED1, 1 - FLED2
+
+Optional properties of the LED child node:
+- label : see Documentation/devicetree/bindings/leds/common.txt
+- max-microamp : see Documentation/devicetree/bindings/leds/common.txt
+		Range: 15625 - 250000
+- flash-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
+		Range: 15625 - 1000000
+- flash-timeout-us : see Documentation/devicetree/bindings/leds/common.txt
+		Range: 62500 - 1000000
+
  Example:
+#include <dt-bindings/leds/common.h>
+
  	max77693@66 {
  		compatible = "maxim,max77693";
  		reg = <0x66>;
@@ -117,5 +165,20 @@ Example:
  			maxim,thermal-regulation-celsius = <75>;
  			maxim,battery-overcurrent-microamp = <3000000>;
  			maxim,charge-input-threshold-microvolt = <4300000>;
+
+		led {
+			compatible = "maxim,max77693-led";
+			maxim,trigger-type = <LEDS_TRIG_TYPE_LEVEL>;
+			maxim,boost-mode = <LEDS_BOOST_FIXED>;
+			maxim,boost-mvout = <5000>;
+			maxim,mvsys-min = <2400>;
+
+			camera_flash: flash-led {
+				label = "max77693-flash";
+				led-sources = <0>, <1>;
+				max-microamp = <500000>;
+				flash-max-microamp = <1250000>;
+				flash-timeout-us = <1000000>;
+			};
  		};
  	};
--

1.7.9.5

Quoted 5 lines

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

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

Signature · 2 lines
Best Regards,
Jacek Anaszewski
#5 lore raw

Re: [PATCH v3] DT: Add documentation for the mfd Maxim max77693

Hi,

Quoted 15 lines
Quoted 10 lines

Documentation/devicetree/bindings/mfd/max77693.txt Optional properties: · line 95

Quoted 7 lines
Documentation/devicetree/bindings/mfd/max77693.txt +7 -0
+Optional properties:
+- maxim,trigger-type : Flash trigger type.
+	Possible trigger types:
+		LEDS_TRIG_TYPE_EDGE (0) - Rising edge of the signal triggers
+			the flash,
+		LEDS_TRIG_TYPE_LEVEL (1) - Strobe pulse length controls duration
+			of the flash.

Surely this is required? What should be assumed if this property isn't present?

LEDS_TRIG_TYPE_LEVEL allows for an ISP to do e.g. short flash blink before the actual strobe - it is used for eliminating photographs with closed eyes, or can serve for probing ambient light conditions.

Quoted 5 lines

With LEDS_TRIG_TYPE_EDGE flash strobe is triggered on rising edge and lasts until programmed timeout expires.

This setting is tightly related to a camera sensor, which generates the strobe signal. Effectively it depends on board configuration.

My comment wasn't to do with the semantics of eitehr option but rather the optionality of the property.

Surely it's vital to know what this should be, and hence this property should be required rather than optional?

If it isn't required, what would the assumed default be?

Mark.

#6 lore raw

Re: [PATCH v3] DT: Add documentation for the mfd Maxim max77693

Hi Mark,

Quoted 23 lines · Mark Rutland

Hi,

Quoted 15 lines
Quoted 10 lines

Documentation/devicetree/bindings/mfd/max77693.txt Optional properties: · line 95

Quoted 7 lines
Documentation/devicetree/bindings/mfd/max77693.txt +7 -0
+Optional properties:
+- maxim,trigger-type : Flash trigger type.
+	Possible trigger types:
+		LEDS_TRIG_TYPE_EDGE (0) - Rising edge of the signal triggers
+			the flash,
+		LEDS_TRIG_TYPE_LEVEL (1) - Strobe pulse length controls duration
+			of the flash.

Surely this is required? What should be assumed if this property isn't present?

LEDS_TRIG_TYPE_LEVEL allows for an ISP to do e.g. short flash blink before the actual strobe - it is used for eliminating photographs with closed eyes, or can serve for probing ambient light conditions.

Quoted 5 lines

With LEDS_TRIG_TYPE_EDGE flash strobe is triggered on rising edge and lasts until programmed timeout expires.

This setting is tightly related to a camera sensor, which generates the strobe signal. Effectively it depends on board configuration.

Quoted 7 lines

My comment wasn't to do with the semantics of eitehr option but rather the optionality of the property.

Surely it's vital to know what this should be, and hence this property should be required rather than optional?

If it isn't required, what would the assumed default be?

Default is LEDS_TRIG_TYPE_EDGE.

Signature · 2 lines
Best Regards,
Jacek Anaszewski
#7 lore raw

Re: [PATCH v3] DT: Add documentation for the mfd Maxim max77693

In reply to Mark Rutland

Hi Mark and Jacek,

Quoted 23 lines · Mark Rutland

Hi,

Quoted 15 lines
Quoted 10 lines

Documentation/devicetree/bindings/mfd/max77693.txt Optional properties: · line 95

Quoted 7 lines
Documentation/devicetree/bindings/mfd/max77693.txt +7 -0
+Optional properties:
+- maxim,trigger-type : Flash trigger type.
+	Possible trigger types:
+		LEDS_TRIG_TYPE_EDGE (0) - Rising edge of the signal triggers
+			the flash,
+		LEDS_TRIG_TYPE_LEVEL (1) - Strobe pulse length controls duration
+			of the flash.

Surely this is required? What should be assumed if this property isn't present?

LEDS_TRIG_TYPE_LEVEL allows for an ISP to do e.g. short flash blink before the actual strobe - it is used for eliminating photographs with closed eyes, or can serve for probing ambient light conditions.

Quoted 5 lines

With LEDS_TRIG_TYPE_EDGE flash strobe is triggered on rising edge and lasts until programmed timeout expires.

This setting is tightly related to a camera sensor, which generates the strobe signal. Effectively it depends on board configuration.

Quoted 7 lines

My comment wasn't to do with the semantics of eitehr option but rather the optionality of the property.

Surely it's vital to know what this should be, and hence this property should be required rather than optional?

If it isn't required, what would the assumed default be?

I wonder if there's a use case for edge triggering. In level trigger mode, whichever component generates the trigger signal, determines also the strobe time (up to the timeout). The sensor or (in the case of lack of the signal from the sensor) the ISP has the most information on the sensor timing.

The existing as3654a driver only supports level triggering while the chip can do edge, too.

I'd make level default and perhaps add a V4L2 control / sysfs file to change this if needed.

Signature · 4 lines
Kind regards,

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

Re: [PATCH v3] DT: Add documentation for the mfd Maxim max77693

Hi Sakari,

Quoted 39 lines · On 03/31/2015 11:14 AM, [email protected] wrote:

Hi Mark and Jacek,

Quoted 23 lines · Mark Rutland

Hi,

Quoted 15 lines
Quoted 10 lines

Documentation/devicetree/bindings/mfd/max77693.txt Optional properties: · line 95

Quoted 7 lines
Documentation/devicetree/bindings/mfd/max77693.txt +7 -0
+Optional properties:
+- maxim,trigger-type : Flash trigger type.
+	Possible trigger types:
+		LEDS_TRIG_TYPE_EDGE (0) - Rising edge of the signal triggers
+			the flash,
+		LEDS_TRIG_TYPE_LEVEL (1) - Strobe pulse length controls duration
+			of the flash.

Surely this is required? What should be assumed if this property isn't present?

LEDS_TRIG_TYPE_LEVEL allows for an ISP to do e.g. short flash blink before the actual strobe - it is used for eliminating photographs with closed eyes, or can serve for probing ambient light conditions.

Quoted 5 lines

With LEDS_TRIG_TYPE_EDGE flash strobe is triggered on rising edge and lasts until programmed timeout expires.

This setting is tightly related to a camera sensor, which generates the strobe signal. Effectively it depends on board configuration.

Quoted 7 lines

My comment wasn't to do with the semantics of eitehr option but rather the optionality of the property.

Surely it's vital to know what this should be, and hence this property should be required rather than optional?

If it isn't required, what would the assumed default be?

I wonder if there's a use case for edge triggering. In level trigger mode, whichever component generates the trigger signal, determines also the strobe time (up to the timeout). The sensor or (in the case of lack of the signal from the sensor) the ISP has the most information on the sensor timing.

Quoted 5 lines

The existing as3654a driver only supports level triggering while the chip can do edge, too.

I'd make level default and perhaps add a V4L2 control / sysfs file to change this if needed.

That sounds reasonable. I am going to come up with another version of leds-max77693.c patch anyway, so I'll address this issue too.

Signature · 2 lines
Best Regards,
Jacek Anaszewski