[media] V4L: Add V4L2_ASYNC_MATCH_OF subdev matching type
[firefly-linux-kernel-4.4.55.git] / include / media / v4l2-async.h
index c3ec6ac75f7e9837f9d686ab87f3b69f455945f7..82b29813f8bed989acb24e377f7d5cfca313a251 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/mutex.h>
 
 struct device;
+struct device_node;
 struct v4l2_device;
 struct v4l2_subdev;
 struct v4l2_async_notifier;
@@ -22,10 +23,11 @@ struct v4l2_async_notifier;
 /* A random max subdevice number, used to allocate an array on stack */
 #define V4L2_MAX_SUBDEVS 128U
 
-enum v4l2_async_bus_type {
-       V4L2_ASYNC_BUS_CUSTOM,
-       V4L2_ASYNC_BUS_PLATFORM,
-       V4L2_ASYNC_BUS_I2C,
+enum v4l2_async_match_type {
+       V4L2_ASYNC_MATCH_CUSTOM,
+       V4L2_ASYNC_MATCH_DEVNAME,
+       V4L2_ASYNC_MATCH_I2C,
+       V4L2_ASYNC_MATCH_OF,
 };
 
 /**
@@ -36,11 +38,14 @@ enum v4l2_async_bus_type {
  *             probed, to a notifier->waiting list
  */
 struct v4l2_async_subdev {
-       enum v4l2_async_bus_type bus_type;
+       enum v4l2_async_match_type match_type;
        union {
+               struct {
+                       const struct device_node *node;
+               } of;
                struct {
                        const char *name;
-               } platform;
+               } device_name;
                struct {
                        int adapter_id;
                        unsigned short address;