dt: bindings: Add a binding for flash devices associated to a sensor
Subsystems (3)
PATCH 1/1 dt: bindings: Add a binding for flash devices associated to a sensor
Camera flash drivers (and LEDs) are separate from the sensor devices in DT. In order to make an association between the two, provide the association information to the software.
---
Hi Rob and Jacek, others,
I know I've submitted previous versions of this patch that I have changed since getting your acks... that's bad. I realised there will be problems due to the vague referencing in the old version.
Instead of referring to the flash LED controller itself, the references are now suggested to be made to the LEDs explicitly.
While most of the time all LEDs are associated to the same camera sensor, there's nothing that suggests that this will always be the case. This will work rather nicely with this change to the V4L2 flash class:
An alternative to this could be to refer to the LEDs using the LED controller node and integer arguments. That would require e.g. #led-cells property to tell how many arguments there are. The actual LEDs also have device nodes already so I thought using them would probably be a good idea so we continue to have a single way to refer to LEDs.
Let me know your thoughts / if you're ok with the patch.
Documentation/devicetree/bindings/media/video-interfaces.txt | 8 ++++++++ 1 file changed, 8 insertions(+)
Documentation/devicetree/bindings/media/video-interfaces.txt +8 -0
@@ -67,6 +67,14 @@ are required in a relevant parent node: identifier, should be 1. - #size-cells : should be zero. + +Optional properties +------------------- + +- flash: An array of phandles referring to the flash LED, a sub-node + of the LED driver device node. + + Optional endpoint properties ----------------------------
Signature · 6 lines
2.11.0 -- 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
Quoted 19 lines · Sakari Ailus
Camera flash drivers (and LEDs) are separate from the sensor devices in DT. In order to make an association between the two, provide the association information to the software.
Signed-off-by Sakari Ailus <[email protected]>---
Hi Rob and Jacek, others,I know I've submitted previous versions of this patch that I have changed since getting your acks... that's bad. I realised there will be problems due to the vague referencing in the old version.
Instead of referring to the flash LED controller itself, the references are now suggested to be made to the LEDs explicitly.
While most of the time all LEDs are associated to the same camera sensor, there's nothing that suggests that this will always be the case. This will work rather nicely with this change to the V4L2 flash class:
Quoted 7 lines
An alternative to this could be to refer to the LEDs using the LED controller node and integer arguments. That would require e.g. #led-cells property to tell how many arguments there are. The actual LEDs also have device nodes already so I thought using them would probably be a good idea so we continue to have a single way to refer to LEDs.
There are some advantages to this approach, but I don't think it fits the normal pattern since we do have LED nodes.
Quoted 2 lines
Let me know your thoughts / if you're ok with the patch.
So, I think this patch is the right way to do it.
Quoted 26 lines
Documentation/devicetree/bindings/media/video-interfaces.txt | 8 ++++++++ 1 file changed, 8 insertions(+)Documentation/devicetree/bindings/media/video-interfaces.txt +8
-0@@ -67,6 +67,14 @@ are required in a relevant parent node: identifier, should be 1. - #size-cells : should be zero. + +Optional properties +------------------- + +- flash: An array of phandles referring to the flash LED, a sub-node + of the LED driver device node. + + Optional endpoint properties ----------------------------Signature · 1 line
2.11.0