Lines Matching +full:sub +full:- +full:bus
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * V4L2 sub-device support header.
12 #include <linux/v4l2-subdev.h>
13 #include <media/media-entity.h>
14 #include <media/v4l2-async.h>
15 #include <media/v4l2-common.h>
16 #include <media/v4l2-dev.h>
17 #include <media/v4l2-fh.h>
18 #include <media/v4l2-mediabus.h>
43 * struct v4l2_decode_vbi_line - used to decode_vbi_line
49 * @line: Line number of the sliced VBI data (1-23)
60 * Sub-devices are devices that are connected somehow to the main bridge
64 * Usually these devices are controlled through an i2c bus, but other buses
68 * generic manner. Most operations that these sub-devices support fall in
97 * The ioctl ops is meant for generic ioctl-like commands. Depending on
98 * the use-case it might be better to use subdev-specific ops (currently
99 * not yet implemented) since ops provide proper type-checking.
103 * enum v4l2_subdev_io_pin_bits - Subdevice external IO pin configuration
110 * &struct v4l2_subdev_io_pin_config->value.
123 * struct v4l2_subdev_io_pin_config - Subdevice external IO pin configuration
129 * @value: Initial value for pin - e.g. GPIO output value
141 * struct v4l2_subdev_core_ops - Define core ops callbacks for subdevs
159 * drivers without discussing this first on the linux-media mailinglist.
165 * @command: called by in-kernel drivers in order to call functions internal
213 struct v4l2_event_subscription *sub);
215 struct v4l2_event_subscription *sub);
219 * struct v4l2_subdev_tuner_ops - Callbacks used when v4l device was opened
233 * freq->type must be filled in. Normally done by video_ioctl2()
240 * @s_tuner: callback for VIDIOC_S_TUNER() ioctl handler code. @vt->type must be
283 * struct v4l2_subdev_audio_ops - Callbacks used for audio-related settings
289 * -EINVAL is returned.
294 * If the frequency is not supported, then %-EINVAL is returned.
298 * Never attempt to use user-level input IDs (e.g. Composite, S-Video,
302 * The calling driver is responsible for mapping a user-level input to
316 * enum v4l2_mbus_frame_desc_flags - media bus frame description flags
319 * Indicates that &struct v4l2_mbus_frame_desc_entry->length field
331 * struct v4l2_mbus_frame_desc_entry - media bus frame description structure
334 * @pixelcode: media bus pixel code, valid if @flags
348 * struct v4l2_mbus_frame_desc - media bus data frame description
358 * enum v4l2_subdev_pre_streamon_flags - Flags for pre_streamon subdev core op
360 * @V4L2_SUBDEV_PRE_STREAMON_FL_MANUAL_LP: Set the transmitter to either LP-11
361 * or LP-111 mode before call to s_stream().
368 * struct v4l2_subdev_video_ops - Callbacks used when v4l device was opened
377 * to 0. If the frequency is not supported, then -EINVAL is returned.
411 * @s_dv_timings: Set custom dv timings in the sub device. This is used
412 * when sub device is capable of setting detailed timing information
415 * @g_dv_timings: Get custom dv timings in the sub device.
424 * initialising the bus. Current usage is to set a CSI-2 transmitter to
425 * LP-11 or LP-111 mode before streaming. See &enum
429 * indicated by the flags argument. In particular, -EACCES indicates lack
466 * struct v4l2_subdev_vbi_ops - Callbacks used when v4l device was opened
486 * the readback register contains invalid or erroneous data %-EIO is
511 * struct v4l2_subdev_sensor_ops - v4l2-subdev sensor operations
526 * enum v4l2_subdev_ir_mode- describes the type of IR supported
535 * struct v4l2_subdev_ir_parameters - Parameters for IR TX or TX
584 * struct v4l2_subdev_ir_ops - operations for IR subdevices
587 * The semantics are similar to a non-blocking read() call.
596 * settings - e.g. an actual carrier setting of 35,904 Hz when 36,000 Hz
603 * The semantics are similar to a non-blocking write() call.
612 * settings - e.g. an actual carrier setting of 35,904 Hz when 36,000 Hz
639 * struct v4l2_subdev_pad_config - Used for storing subdev pad information.
656 * struct v4l2_subdev_state - Used for storing subdev state information.
669 * struct v4l2_subdev_pad_ops - v4l2-subdev pad level operations
701 * @get_frame_desc: get the current low level media bus frame parameters.
703 * @set_frame_desc: set the low level media bus frame parameters, @fd array
706 * @get_mbus_config: get the media bus configuration of a remote sub-device.
707 * The media bus configuration is usually retrieved from the
708 * firmware interface at sub-device probe time, immediately
710 * driver. Remote sub-devices (usually video receivers) shall
711 * use this operation to query the transmitting end bus
713 * Callers should make sure they get the most up-to-date as
719 * @set_mbus_config: set the media bus configuration of a remote sub-device.
721 * the get_mbus_config operation, the negotiation of media bus
722 * configuration parameters between media sub-devices. The
776 * struct v4l2_subdev_ops - Subdev operations
799 * struct v4l2_subdev_internal_ops - V4L2 subdev internal ops
814 * filehandle to the v4l-subdevX device node was closed. If no device
815 * node was created for this sub-device, then the @release callback
819 * sub-device that sets the V4L2_SUBDEV_FL_HAS_DEVNODE flag.
851 * struct v4l2_subdev_platform_data - regulators config struct
855 * @host_priv: Per-subdevice data, specific for a certain video host device
865 * struct v4l2_subdev - describes a V4L2 sub-device
868 * @list: List of sub-devices
870 * @owner_v4l2_dev: true if the &sd->owner matches the owner of @v4l2_dev->dev
873 * %V4L2_SUBDEV_FL_IS_I2C - Set this flag if this subdev is a i2c device;
874 * %V4L2_SUBDEV_FL_IS_SPI - Set this flag if this subdev is a spi device;
875 * %V4L2_SUBDEV_FL_HAS_DEVNODE - Set this flag if this subdev needs a
877 * %V4L2_SUBDEV_FL_HAS_EVENTS - Set this flag if this subdev generates
885 * @name: Name of the sub-device. Please notice that the name must be unique.
886 * @grp_id: can be used to group similar subdevs. Value is driver-specific
893 * either dev->of_node->fwnode or dev->fwnode (whichever is non-NULL).
894 * @async_list: Links this subdev to a global subdev_list or @notifier->done
898 * @subdev_notifier: A sub-device notifier implicitly registered for the sub-
903 * stand-alone or embedded in a larger struct.
936 * media_entity_to_v4l2_subdev - Returns a &struct v4l2_subdev from
951 * vdev_to_v4l2_subdev - Returns a &struct v4l2_subdev from
960 * struct v4l2_subdev_fh - Used for storing subdev information per file handle
975 * to_v4l2_subdev_fh - Returns a &struct v4l2_subdev_fh from
986 * v4l2_subdev_get_try_format - ancillary routine to call
987 * &struct v4l2_subdev_pad_config->try_fmt
991 * @pad: index of the pad in the &struct v4l2_subdev_state->pads array
998 if (WARN_ON(pad >= sd->entity.num_pads)) in v4l2_subdev_get_try_format()
1000 return &state->pads[pad].try_fmt; in v4l2_subdev_get_try_format()
1004 * v4l2_subdev_get_try_crop - ancillary routine to call
1005 * &struct v4l2_subdev_pad_config->try_crop
1009 * @pad: index of the pad in the &struct v4l2_subdev_state->pads array.
1016 if (WARN_ON(pad >= sd->entity.num_pads)) in v4l2_subdev_get_try_crop()
1018 return &state->pads[pad].try_crop; in v4l2_subdev_get_try_crop()
1022 * v4l2_subdev_get_try_compose - ancillary routine to call
1023 * &struct v4l2_subdev_pad_config->try_compose
1027 * @pad: index of the pad in the &struct v4l2_subdev_state->pads array.
1034 if (WARN_ON(pad >= sd->entity.num_pads)) in v4l2_subdev_get_try_compose()
1036 return &state->pads[pad].try_compose; in v4l2_subdev_get_try_compose()
1044 * v4l2_set_subdevdata - Sets V4L2 dev private device data
1051 sd->dev_priv = p; in v4l2_set_subdevdata()
1055 * v4l2_get_subdevdata - Gets V4L2 dev private device data
1063 return sd->dev_priv; in v4l2_get_subdevdata()
1067 * v4l2_set_subdev_hostdata - Sets V4L2 dev private host data
1074 sd->host_priv = p; in v4l2_set_subdev_hostdata()
1078 * v4l2_get_subdev_hostdata - Gets V4L2 dev private data
1086 return sd->host_priv; in v4l2_get_subdev_hostdata()
1092 * v4l2_subdev_get_fwnode_pad_1_to_1 - Get pad number from a subdev fwnode
1109 * v4l2_subdev_link_validate_default - validates a media link
1116 * This function ensures that width, height and the media bus pixel
1125 * v4l2_subdev_link_validate - validates a media link
1132 * width, height and the media bus pixel code are equal on both
1138 * v4l2_subdev_alloc_state - allocate v4l2_subdev_state
1147 * v4l2_subdev_free_state - free a v4l2_subdev_state
1156 * v4l2_subdev_init - initializes the sub-device struct
1167 * v4l2_subdev_call - call an operation of a v4l2_subdev.
1184 __result = -ENODEV; \
1185 else if (!(__sd->ops->o && __sd->ops->o->f)) \
1186 __result = -ENOIOCTLCMD; \
1188 v4l2_subdev_call_wrappers.o->f) \
1189 __result = v4l2_subdev_call_wrappers.o->f( \
1192 __result = __sd->ops->o->f(__sd, ##args); \
1197 * v4l2_subdev_has_op - Checks if a subdev defines a certain operation.
1205 ((sd)->ops->o && (sd)->ops->o->f)
1208 * v4l2_subdev_notify_event() - Delivers event notification for subdevice