Source
x
* video_is_registered - returns true if the &struct video_device is registered.
/* SPDX-License-Identifier: GPL-2.0 */
/*
*
* V 4 L 2 D R I V E R H E L P E R A P I
*
* Moved from videodev2.h
*
* Some commonly needed functions for drivers (v4l2-common.o module)
*/
/**
* enum vfl_devnode_type - type of V4L2 device node
*
* @VFL_TYPE_GRABBER: for video input/output devices
* @VFL_TYPE_VBI: for vertical blank data (i.e. closed captions, teletext)
* @VFL_TYPE_RADIO: for radio tuners
* @VFL_TYPE_SUBDEV: for V4L2 subdevices
* @VFL_TYPE_SDR: for Software Defined Radio tuners
* @VFL_TYPE_TOUCH: for touch sensors
* @VFL_TYPE_MAX: number of VFL types, must always be last in the enum
*/
enum vfl_devnode_type {
VFL_TYPE_GRABBER = 0,
VFL_TYPE_VBI,
VFL_TYPE_RADIO,
VFL_TYPE_SUBDEV,
VFL_TYPE_SDR,
VFL_TYPE_TOUCH,
VFL_TYPE_MAX /* Shall be the last one */
};
/**
* enum vfl_direction - Identifies if a &struct video_device corresponds
* to a receiver, a transmitter or a mem-to-mem device.
*
* @VFL_DIR_RX: device is a receiver.
* @VFL_DIR_TX: device is a transmitter.
* @VFL_DIR_M2M: device is a memory to memory device.
*
* Note: Ignored if &enum vfl_devnode_type is %VFL_TYPE_SUBDEV.
*/
enum vfl_devnode_direction {
VFL_DIR_RX,
VFL_DIR_TX,
VFL_DIR_M2M,
};
struct v4l2_ioctl_callbacks;
struct video_device;
struct v4l2_device;
struct v4l2_ctrl_handler;
/**
* enum v4l2_video_device_flags - Flags used by &struct video_device
*
* @V4L2_FL_REGISTERED:
* indicates that a &struct video_device is registered.
* Drivers can clear this flag if they want to block all future
* device access. It is cleared by video_unregister_device.
* @V4L2_FL_USES_V4L2_FH:
* indicates that file->private_data points to &struct v4l2_fh.
* This flag is set by the core when v4l2_fh_init() is called.
* All new drivers should use it.
* @V4L2_FL_QUIRK_INVERTED_CROP:
* some old M2M drivers use g/s_crop/cropcap incorrectly: crop and
* compose are swapped. If this flag is set, then the selection
* targets are swapped in the g/s_crop/cropcap functions in v4l2-ioctl.c.
* This allows those drivers to correctly implement the selection API,
* but the old crop API will still work as expected in order to preserve
* backwards compatibility.
* Never set this flag for new drivers.
*/
enum v4l2_video_device_flags {
V4L2_FL_REGISTERED = 0,
V4L2_FL_USES_V4L2_FH = 1,
V4L2_FL_QUIRK_INVERTED_CROP = 2,
};
/* Priority helper functions */