Lines Matching +full:sub +full:- +full:device
1 /* SPDX-License-Identifier: GPL-2.0-only */
8 * Copyright (C) 2012 - 2013 Samsung Electronics Co., Ltd.
22 #include <media/v4l2-mediabus.h>
31 * struct v4l2_fwnode_bus_mipi_csi2 - MIPI CSI-2 bus data structure
48 * struct v4l2_fwnode_bus_parallel - parallel data bus data structure
60 * struct v4l2_fwnode_bus_mipi_csi1 - CSI-1/CCP2 data bus structure
62 * false - not inverted, true - inverted
63 * @strobe: false - data/clock, true - data/strobe
78 * struct v4l2_fwnode_endpoint - the endpoint data structure
112 * V4L2_FWNODE_PROPERTY_UNSET - identify a non initialized property
117 #define V4L2_FWNODE_PROPERTY_UNSET (-1U)
120 * enum v4l2_fwnode_orientation - possible device orientation
121 * @V4L2_FWNODE_ORIENTATION_FRONT: device installed on the front side
122 * @V4L2_FWNODE_ORIENTATION_BACK: device installed on the back side
123 * @V4L2_FWNODE_ORIENTATION_EXTERNAL: device externally located
132 * struct v4l2_fwnode_device_properties - fwnode device properties
133 * @orientation: device orientation. See &enum v4l2_fwnode_orientation
134 * @rotation: device rotation
142 * struct v4l2_fwnode_link - a link between two endpoints
160 * enum v4l2_connector_type - connector type
172 * struct v4l2_connector_link - connector link data structure
176 * device the connector belongs to.
184 * struct v4l2_fwnode_connector_analog - analog connector data structure
193 * struct v4l2_fwnode_connector - the connector data structure
194 * @name: the connector device name
217 * v4l2_fwnode_endpoint_parse() - parse all fwnode node properties
224 * endpoint --- a configuration that shall be in line with the DT binding
225 * documentation. Should a device support multiple bus types, the caller may
226 * call this function once the correct type is found --- with a default
230 * FEATURE REQUIRES "bus-type" PROPERTY IN DT BINDINGS. For old drivers,
231 * guessing @vep.bus_type between CSI-2 D-PHY, parallel and BT.656 busses is
244 * %-ENOMEM on memory allocation failure
245 * %-EINVAL on parsing failure
246 * %-ENXIO on mismatching bus types
252 * v4l2_fwnode_endpoint_free() - free the V4L2 fwnode acquired by
262 * v4l2_fwnode_endpoint_alloc_parse() - parse all fwnode node properties
269 * endpoint --- a configuration that shall be in line with the DT binding
270 * documentation. Should a device support multiple bus types, the caller may
271 * call this function once the correct type is found --- with a default
275 * FEATURE REQUIRES "bus-type" PROPERTY IN DT BINDINGS. For old drivers,
276 * guessing @vep.bus_type between CSI-2 D-PHY, parallel and BT.656 busses is
293 * %-ENOMEM on memory allocation failure
294 * %-EINVAL on parsing failure
295 * %-ENXIO on mismatching bus types
301 * v4l2_fwnode_parse_link() - parse a link between two endpoints
309 * grand-parent node of the port node otherwise).
315 * Return: 0 on success, or -ENOLINK if the remote endpoint fwnode can't be
322 * v4l2_fwnode_put_link() - drop references to nodes in a link
331 * v4l2_fwnode_connector_free() - free the V4L2 connector acquired memory
343 * v4l2_fwnode_connector_parse() - initialize the 'struct v4l2_fwnode_connector'
359 * * %-EINVAL if @fwnode is invalid
360 * * %-ENOTCONN if connector type is unknown or connector device can't be found
366 * v4l2_fwnode_connector_add_link - add a link between a connector node and
367 * a v4l2-subdev node.
374 * points to the connector node, the remote_node to the host v4l2 (sub)dev.
382 * * %-EINVAL if @fwnode or @connector is invalid or @connector type is unknown
383 * * %-ENOMEM on link memory allocation failure
384 * * %-ENOTCONN if remote connector device can't be found
385 * * %-ENOLINK if link parsing between v4l2 (sub)dev and connector fails
391 * v4l2_fwnode_device_parse() - parse fwnode device properties
392 * @dev: pointer to &struct device
396 * This function parses and validates the V4L2 fwnode device properties from the
402 * %-EINVAL if a parsed property value is not valid
404 int v4l2_fwnode_device_parse(struct device *dev,
408 * typedef parse_endpoint_func - Driver's callback function to be called on
411 * @dev: pointer to &struct device
417 * * %-ENOTCONN if the endpoint is to be skipped but this
419 * * %-EINVAL if the endpoint configuration is invalid
421 typedef int (*parse_endpoint_func)(struct device *dev,
426 * v4l2_async_notifier_parse_fwnode_endpoints - Parse V4L2 fwnode endpoints in a
427 * device node
428 * @dev: the device the endpoints of which are to be parsed
430 * @asd_struct_size: size of the driver's async sub-device struct, including
433 * the driver's async sub-device struct, i.e. both
438 * Parse the fwnode endpoints of the @dev device and populate the async sub-
440 * called for each endpoint with the corresponding async sub-device pointer to
441 * let the caller initialize the driver-specific part of the async sub-device
456 * sub-devices are no longer in use, even if the function returned an error.
458 * Return: %0 on success, including when no async sub-devices are found
459 * %-ENOMEM if memory allocation failed
460 * %-EINVAL if graph or endpoint parsing failed
464 v4l2_async_notifier_parse_fwnode_endpoints(struct device *dev,
470 * v4l2_async_notifier_parse_fwnode_endpoints_by_port - Parse V4L2 fwnode
472 * device node
473 * @dev: the device the endpoints of which are to be parsed
475 * @asd_struct_size: size of the driver's async sub-device struct, including
478 * the driver's async sub-device struct, i.e. both
486 * on devices that have both sinks and sources: the async sub-devices connected
490 * Parse the fwnode endpoints of the @dev device on a given @port and populate
491 * the async sub-devices list of the notifier. The @parse_endpoint callback
492 * function is called for each endpoint with the corresponding async sub-device
493 * pointer to let the caller initialize the driver-specific part of the async
494 * sub-device structure.
508 * sub-devices are no longer in use, even if the function returned an error.
510 * Return: %0 on success, including when no async sub-devices are found
511 * %-ENOMEM if memory allocation failed
512 * %-EINVAL if graph or endpoint parsing failed
516 v4l2_async_notifier_parse_fwnode_endpoints_by_port(struct device *dev,
523 * v4l2_fwnode_reference_parse_sensor_common - parse common references on
524 * sensors for async sub-devices
525 * @dev: the device node the properties of which are parsed for references
529 * sensor and set up async sub-devices for them.
533 * sub-devices are no longer in use, even in the case the function returned an
537 * -ENOMEM if memory allocation failed
538 * -EINVAL if property parsing failed
540 int v4l2_async_notifier_parse_fwnode_sensor_common(struct device *dev,
545 /** v4l2_connector_last_link - Helper macro to get the first
553 list_first_entry_or_null(&(v4l2c)->links, \
556 /** v4l2_connector_last_link - Helper macro to get the last
563 list_last_entry(&(v4l2c)->links, struct v4l2_connector_link, head)