include/media/v4l2-async.h

Source file repositories/reference/linux-study-clean/include/media/v4l2-async.h

File Facts

System
Linux kernel
Corpus path
include/media/v4l2-async.h
Extension
.h
Size
12193 bytes
Lines
349
Domain
Repository Root And Misc
Bucket
include
Inferred role
Repository Root And Misc: implementation source
Status
source implementation candidate

Why This File Exists

Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.

Dependency Surface

Detected Declarations

Annotated Snippet

struct v4l2_async_match_desc {
	enum v4l2_async_match_type type;
	union {
		struct fwnode_handle *fwnode;
		struct {
			int adapter_id;
			unsigned short address;
		} i2c;
	};
};

/**
 * struct v4l2_async_connection - sub-device connection descriptor, as known to
 *				  a bridge
 *
 * @match:	struct of match type and per-bus type matching data sets
 * @notifier:	the async notifier the connection is related to
 * @asc_entry:	used to add struct v4l2_async_connection objects to the
 *		notifier @waiting_list or @done_list
 * @asc_subdev_entry:	entry in struct v4l2_async_subdev.asc_list list
 * @sd:		the related sub-device
 *
 * When this struct is used as a member in a driver specific struct, the driver
 * specific struct shall contain the &struct v4l2_async_connection as its first
 * member.
 */
struct v4l2_async_connection {
	struct v4l2_async_match_desc match;
	struct v4l2_async_notifier *notifier;
	struct list_head asc_entry;
	struct list_head asc_subdev_entry;
	struct v4l2_subdev *sd;
};

/**
 * struct v4l2_async_notifier_operations - Asynchronous V4L2 notifier operations
 * @bound:	a sub-device has been bound by the given connection
 * @complete:	All connections have been bound successfully. The complete
 *		callback is only executed for the root notifier.
 * @unbind:	a subdevice is leaving
 * @destroy:	the asc is about to be freed
 */
struct v4l2_async_notifier_operations {
	int (*bound)(struct v4l2_async_notifier *notifier,
		     struct v4l2_subdev *subdev,
		     struct v4l2_async_connection *asc);
	int (*complete)(struct v4l2_async_notifier *notifier);
	void (*unbind)(struct v4l2_async_notifier *notifier,
		       struct v4l2_subdev *subdev,
		       struct v4l2_async_connection *asc);
	void (*destroy)(struct v4l2_async_connection *asc);
};

/**
 * struct v4l2_async_notifier - v4l2_device notifier data
 *
 * @ops:	notifier operations
 * @v4l2_dev:	v4l2_device of the root notifier, NULL otherwise
 * @sd:		sub-device that registered the notifier, NULL otherwise
 * @parent:	parent notifier
 * @waiting_list: list of struct v4l2_async_connection, waiting for their
 *		  drivers
 * @done_list:	list of struct v4l2_subdev, already probed
 * @notifier_entry: member in a global list of notifiers
 */
struct v4l2_async_notifier {
	const struct v4l2_async_notifier_operations *ops;
	struct v4l2_device *v4l2_dev;
	struct v4l2_subdev *sd;
	struct v4l2_async_notifier *parent;
	struct list_head waiting_list;
	struct list_head done_list;
	struct list_head notifier_entry;
};

/**
 * struct v4l2_async_subdev_endpoint - Entry in sub-device's fwnode list
 *
 * @async_subdev_endpoint_entry: An entry in async_subdev_endpoint_list of
 *				 &struct v4l2_subdev
 * @endpoint: Endpoint fwnode agains which to match the sub-device
 */
struct v4l2_async_subdev_endpoint {
	struct list_head async_subdev_endpoint_entry;
	struct fwnode_handle *endpoint;
};

/**
 * v4l2_async_debug_init - Initialize debugging tools.
 *

Annotation

Implementation Notes